This article mainly introduces the method of updating npm and node under windows. The editor thinks it is quite good, so I will share it with you now and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.
The company's new project is about to start, and it needs to use Angular 4.0 and use the webpack tool for packaging. So you need to install node. The installation of node is very simple. Go to node's official website nodejs.org to download the msi installation package. Currently, the latest version of node is v8.1.2 (open this official website and the most suitable version will be recommended for you based on your system)
After the download is successful, you can install it. By default, it is installed in the C:\Program Files\nodejs folder. Click Next to complete the installation.
It is the first time to install node on the company's computer, but the computer at home needs to update node.
Now enter the topic of this article, the installation of npm and node under windows system.
I saw someone asking "How do I update node and npm on windows?" on stackoverflow. How to update npm and node under windows system. I looked up some methods online and tried them all myself.
First, let’s talk about npm updates:
Check your npm version:
npm -v
Check the official documentation and you will see that using the command npm install npm@latest -g
Second, let’s talk about node updates:
Many opinions on the Internet are to install n module first sudo npm install -g n (Clear npm cache cache sudo npm cache clean -f before this), refer to this article http://www.jb51.net/article/52409.htm. But my computer looks like this after execution:Analysis of node modules and npm package management tools
Use nvm to manage different versions of node and npm
Detailed explanation of how nvm manages different versions of node and npm
The above is the detailed content of Detailed explanation of how to update npm and node under windows. For more information, please follow other related articles on the PHP Chinese website!