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