This article is a mirror article of machine translation, please click here to jump to the original article.

View: 7375|Reply: 0

npm tutorial (2): Installing and using npm

[Copy link]
Posted on 12/13/2017 11:12:14 AM | | | |
Install Node.js

If you're using OS X or Windows, the best way to install Node.js is to use one of the installers from Node.js download page. If you use Linux, you can use the installer or check the binary distribution of NodeSource to see if there is an updated version for your system.

Test: Run node-v. The version should be higher than v0.10.32.

Update npm

node is installed with npm, so you should have a version of NPM. However, npm updates more frequently than Node, so you need to make sure it's up to date.

npm install npm@latest -g

Test: Run npm -v. The version should be higher than 2.1.8.




Install npm manually

For more advanced users.

The npm module can be downloaded from https://registry.npmjs.org/npm/-/npm-{VERSION}.tgz.





Previous:npm tutorial (1): What is npm?
Next:npm tutorial (3): npm does not have permission to store global packages
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com