The configuration method of npm modifying the default installation path

1. Add the NODE_PATH environment variable

NODE_PATH = E:\tool\nodejs


2. Modify the PATH environment variable


Added the following:


%NODE_PATH%;%NODE_PATH%\node_modules;%NODE_PATH%\node_global

3. Open the command window

Execute the following command:

npm config set prefix "E:\tool\nodejs\node_global"

npm config set cache "E:\tool\nodejs\node_cache"




Question one:

npm ERR! code EINTEGRITY  

Solution:

above sea level and -g above sea level



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325731062&siteId=291194637