Release npm package step pit

Yesterday, I tried to release npm package. I ran into a problem. Please record it. First, npm account must be registered Using npm adduser command npm...

Yesterday, I tried to release npm package. I ran into a problem. Please record it.

First, npm account must be registered

Using npm adduser command

npm ERR! code EAUTHUNKNOWN npm ERR! Unable to authenticate, need: Basic

Upgrade npm to 6.9.0 and report another error

npm ERR! code E401 npm ERR! Incorrect or missing password. npm ERR! If you were trying to login, change your password, create an npm ERR! authentication token or enable two-factor authentication then npm ERR! that means you likely typed your password in incorrectly. npm ERR! Please try again, or recover your password at: npm ERR! https://www.npmjs.com/forgot npm ERR! npm ERR! If you were doing some other operation then your saved credentials are npm ERR! probably out of date. To correct this please try logging in again with: npm ERR! npm login

Continue Baidu. It seems that my password is incorrect. In fact, because the source of npm library is redirected, npm adduser will submit the user name and password to http://registry.npm.taobao.org To verify

So cut the source to cnpm.

Continue npm adduser, and this time you will be prompted with user name and mailbox.

The last sentence seems to be a success

Execute the command npm publish to publish

Result reported wrong

$ npm publish npm notice npm notice package: [email protected] npm notice === Tarball Contents === npm notice 435B package.json npm notice === Tarball Details === npm notice name: lx npm notice version: 1.0.0 npm notice package size: 324 B npm notice unpacked size: 435 B npm notice shasum: 60f600a893d64ddc1e71a4707c7de7f5974bcb01 npm notice integrity: sha512-y16NeHDVs1aLk[...]WU0yjiaIvJD4g== npm notice total files: 1 npm notice npm ERR! code E403 npm ERR! 403 Forbidden - PUT http://r.cnpmjs.org/lx - [no_perms] Private mode enable, only admin can publish this module npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\zt\AppData\Roaming\npm_cache\_logs\2019-05-14T07_59_28_430Z-debug.log

cnpm source said that my source was incorrect when it was released

So I switched npm back to npm, and npm source published an error

You have to log in to publish a package, emmmmm

So I went to the official website of npm.js to register manually. https://www.npmjs.com/

Manual registration - then npm login login

You do not have permission to publish "LX"

$ npm publish npm notice npm notice package: [email protected] npm notice === Tarball Contents === npm notice 435B package.json npm notice === Tarball Details === npm notice name: lx npm notice version: 1.0.0 npm notice package size: 324 B npm notice unpacked size: 435 B npm notice shasum: 60f600a893d64ddc1e71a4707c7de7f5974bcb01 npm notice integrity: sha512-y16NeHDVs1aLk[...]WU0yjiaIvJD4g== npm notice total files: 1 npm notice npm ERR! code E403 npm ERR! 403 Forbidden - PUT https://registry.npmjs.org/lx - You do not have permission to publish "lx". Are you logged in as the correct user? npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\zt\AppData\Roaming\npm_cache\_logs\2019-05-14T08_29_28_668Z-debug.log

You must verify your email before publishing a new package: https://www.npmjs.com/email-edit )The email is not verified

Go to email to verify after registration

Finally, it's a success
If you have this sentence, you will be successful: + [email protected]

Then I can install my LX ZT in other projects, cool

10 November 2019, 09:57 | Views: 9620

Add new comment

For adding a comment, please log in
or create account

0 comments