- Download the installation package on the official website https://nodejs.org/en/download/
- Keep clicking Next to install, remember to modify the installation path during installation, do not put it on the C drive
Configure the global module (that is, the module installed with the -g option during installation) and the cached path to prevent it from being installed on the C drive by default and occupying space.
- Create two new folders node_global and node_cache in the node installation directory modified in step 2
Open the console and enter the following command to configure
npm config set prefix "path/to/node_global" npm cpnfig set cache "path/to/node_cache"
- Set environment variables
- "My Computer" - Right Click - "Properties" - "Advanced System Settings" - "Advanced" - "Environment Variables"
- Create a new [NODE_PATH] under [System Variables] and enter path/to/node_global/node_modules
- Change path/to/AppData/Roaming/npm in [Path] under [User Variables] to path/to/node_global
Windows installation and configuration nodejs
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=324501361&siteId=291194637
Recommended
Ranking