1. Create a npm account First
Https://www.npmjs.com/signup
2. Enter the command into the project folder in cmd
3. Create a package.json using the NPM init command (make sure Nodejs is installed)
4, use the NPM login command to login NPM account, if the prompt account is not correct always can not log in,
It may be that the NPM agent has been set up to see the current user directory under C:\Users\xia, whether there is a
. npmrc file, open file to see if there is a setting for the registration agent inside, if there can be deleted after
Login. After successfully logging in, CMD does not have any prompts,
A token is created under the Https://www.npmjs.com/settings/tokens account
At the same time the current user directory C:\Users\xia will also create a file, save this token
5, cmd Execution command npm publish successfully uploaded a package to NPM.
Upload a NPM package