You cannot publish over the previously published versions
This helped me: Open Command Prompt and do the following steps. npm version <new_Version_No> npm publish
This helped me: Open Command Prompt and do the following steps. npm version <new_Version_No> npm publish
If you want to publish a package on npm using the name @npmtestscope/firstpackage, you need to make sure that the namespace @npmtestscope exists on npm. To create that namespace, you need to create an organization on npm with the name npmtestscope. After you have created the organization, you can publish your package named @npmtestscope/firstpackage by … Read more
Silly me. The answer was in the docs all along. In order to publish you need to be logged in from your NPM cli. So either do npm login if you already have a user on npmjs.com, or npm adduser to create one. I would, however, appreciate a more informative error message.
Edit, january 2020: NPM does not show “Powered by npms.io” anymore. I don’t know if this is still accurate. Original answer npm shows these graphs in search results, but they do not calculate these values themselves. If you look below the search results, you’ll see “Powered by npms.io“. According to this service, they don’t inspect … Read more
So, after some digging through the NPM source code, it turns out there is a way to do this. My solution is below: registry=https://registry.npmjs.org/ @test-scope:registry=http://nexus:8081/nexus/content/repositories/npm-test/ //nexus:8081/nexus/content/repositories/npm-test/:username=admin //nexus:8081/nexus/content/repositories/npm-test/:_password=YWRtaW4xMjM= email=… Explanation: The scope @test-scope specifies that packages with the scope should be published to a different registry than the default registry= when executing the npm publish command. … Read more
TL;DR: Make an HTTP request directly to the registry: TOKEN=$(curl -s \ -H “Accept: application/json” \ -H “Content-Type:application/json” \ -X PUT –data ‘{“name”: “username_here”, “password”: “password_here”}’ \ http://your_registry/-/user/org.couchdb.user:username_here 2>&1 | grep -Po \ ‘(?<=”token”: “)[^”]*’) npm set registry “http://your_registry” npm set //your_registry/:_authToken $TOKEN Rationale Behind the scenes npm adduser makes an HTTP request to the … Read more
You need to have registered “supericium” (npm adduser) as a username at the registry and be logged in (npm login) to publish under that scope. https://docs.npmjs.com/getting-started/publishing-npm-packages https://docs.npmjs.com/getting-started/scoped-packages
Try npm install <ghusername>/<repoName>, where <ghUsername> is your GitHub username (without the @) and <repoName> is the name of the repository. That should correctly install it. You will most likely want to use the –save or –save-dev flag with the install command to save dependency in your package.json. If that isn’t working correctly, check the … Read more