Summary: This article mainly documents the problems encountered during the NPM release.
NPM publishing steps
Go to NPM to register your account, then run the following command under your component library and enter the username and password as prompted
npm login
npm publish
Copy the code
Error 1: An error occurs during NPM login
This is mainly because I set the warehouse image to Taobao before
npm config set registry http://registry.npm.taobao.org/
Copy the code
Change it to NPM official and log in successfully
npm config set registry http://registry.npmjs.org
Copy the code
Error 2: : NPM publish has the same NPM package name, you need to change the name in package.js
Error 3: There is no message indicating that the name is incorrect, still 403Forbidden. Finally, it is found that when I applied for NPM account, I did not verify the email address, so I could not publish it as.
To verify the email, go to the email box and click the email link sent by NPM!
Finally, run the NPM publish command to publish the NPM package.