Home > Web Front-end > Front-end Q&A > Install nodejs and npm on win10

Install nodejs and npm on win10

王林
Release: 2023-05-25 13:14:39
Original
935 people have browsed it

With the increase in JavaScript programs, Node.js and npm are becoming more and more popular. However, if you are a newbie, how to install them on Windows 10 may seem a bit difficult. The following will provide you with detailed steps to install Node.js and npm so you can get started easily.

Step One: Download Node.js

Visit the official website of Node.js https://nodejs.org/zh-cn/, and click the "Download" button. By default, the Windows x64-bit version will be downloaded on the current page. If your computer is 32-bit, you will need to click on the "Other Platforms" link and select the required version.

You can choose to allow the Node.js installer to change settings on your computer. Then, click the "Next" button to proceed to the next step.

Step 2: Install Node.js

Use the default settings installer to install. However, please note that in Custom Installation you have the option to change the installation location and also select which components to install. With the default selection of components and versions available for all users, these default settings should meet the needs of most users.

Similarly, you can choose to launch the Node.js installer after completing the installation.

Step 3: Verify that Node.js has been installed correctly

Open PowerShell as an administrator, enter the "node -v" command, and then press Enter. This will output the current version of Node.js in the runtime environment. If you see the version number, Node.js has been successfully installed.

Step 4: Install NPM

NPM (Node Package Manager) is the package manager for Node.js, so if you want to use Node.js for development, you need to install it.

NPM is usually installed with Node.js, so you don't need to install NPM separately yourself. However, in some cases you may need to update NPM or use an older version. At this point, you can install NPM globally using the following command.

npm install npm@latest -g

Now that you have installed Node.js and npm correctly, you can start implementing Node.js-based projects on your computer.

The above is the detailed content of Install nodejs and npm on win10. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template