I'm practicing my English ability lately in order to be recruited by a foreign company for my next job-hopping,if there is anything that I did't express precisely, please pardon me.node
Check out your package.json, "name" and "version" are requiredexpress
Use the add user command to set your Username, Password and Email with the hint.npm adduser
npm
Go to https://www.npmjs.com/~[username], and verify your Email.
e.g: https://www.npmjs.com/~willbu...json
Enter your module's directory, then use the publish command.npm publish
segmentfault
some error occured to me:
1.【problem】: You do not have permission to publish "sayhelloworld". Are you logged in as the correct user? : sayhelloworld
【how to solve】: There is a node module with the same name of your's in the NPM Registry already, you need to change your node module's name.
2.【problem】: You must verify your email before publishing a new package】
【how to solve】: You need to verify your email as the step 3 said.
3.【problem】: You must be logged in to publish packages
【how to solve】: Use command npm login
to login first.ui
npm version [version level] // e.g: npm version patch
code
npm publish
ci
npm unpublish [module name]@[module version] // e.g: npm unpublish hellowWorld@v1.0.1
get
npm unpublish [module name] --froce // e.g: npm unpublish hellowWorld --force
it
Related:
Create a Node.js Module and Use it Locally
Install Pakages Using NPM