Hello all, after publishing NPM package of the mu...
# general
d
Hello all, after publishing NPM package of the multi-language support SDK with typescript . I am getting this error while using that npm package `error: Could not automatically download and install resource plugin 'pulumi-resource-s24'at version v0.0.0, install the plugin using
pulumi plugin install resource s24 v0.0.0
.` Underlying error: error downloading plugin s24 to file: failed to download plugin: b24-0.0.0: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-s24-v0.0.0-darwin-arm64.tar.gz Thank you for your support in advance! Best regards, Bala
e
You need to set the plugin download URL in the schema.json. See
pluginDownloadURL
at https://www.pulumi.com/docs/guides/pulumi-packages/schema/
d
Hi @echoing-dinner-19531 thanks for the update. I have one question, after generate the SDK/nodejs package.json file have
"scripts": {
“build”: “tsc”, “install”: “node scripts/install-pulumi-plugin.js resource s24 ” }, but still do we required to provide “pluginDownloadURL”: “https://api.github.com/repos/batmakur/pulumi-s24/releases/latest”,
e
If it's on github we actually have a better URL format for that, see https://www.pulumi.com/docs/guides/pulumi-packages/how-to-author/#support-for-github-releases
d
Thank you so much for your update. As per the GitHub support documentation I updated the schema.json with values (1st try) “pluginDownloadURL”: “github://api.github.com/batmakur/pulumi-s24” and (2nd try) “pluginDownloadURL”: “github://api.github.com/batmakur” . it’s not worked and still have the same error pulumiproviderss24 (default_0_0_0_github_/api.github.com/batmakur): error: Could not automatically download and install resource plugin ’pulumi-resource-s24’at version v0.0.0, install the plugin using
pulumi plugin install resource s24 v0.0.0
. Underlying error: error downloading plugin s24 to file: failed to download plugin: s24-0.0.0: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-s24-v0.0.0-darwin-arm64.tar.gz
Copy code
var res = childProcess.spawnSync("pulumi", ["plugin", "install", "--server", "<github://api.github.com/batmakur>"].concat(args), {
    stdio: ["ignore", "inherit", "inherit"]
}); in install-pulumi-plugin.js file
e
Is https://github.com/batmakur/pulumi-s24 a private repo? You need to set the environment variable GITHUB_TOKEN to your github api token so we can authenticate the request
d
Yes it is a private repo
e
So if you set GITHUB_TOKEN to a personal access token from https://github.com/settings/tokens it should be able to download
d
I tried the fallowing configuration https://www.pulumi.com/registry/packages/github/installation-configuration/ but still same issue
e
That's to set up the provider, that's not exactly the same as for downloading plugins. GITHUB_TOKEN is just an environment variable, something like
export GITHUB_TOKEN=ghp_abcefghABCDEFG01234
d
Thanks it’s worked for me . I removed my releases from GitHub and also published npm packages. then I publish new base package and added into package.json file . it’s worked . for the last few days I am struggling wit this . thanks for your continuous support and help.
k
Thanks @echoing-dinner-19531! didn’t see that there’s actual support for Github Releases, this is great 💯