Upload a NPM package

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.