This time I will show you how to operatenode.jsDefault npmInstallationdirectory, what are theprecautionswhen operating node.js default npm installation directory , the following is a practical case, let’s take a look.
Modification
1: Open CMD and view the configuration
npm config ls
Two: Create a folder onotherphysical disk such as: D:\sw\develop\nodejs\npm
##Three: Reset
npm config set prefix "D:\sw\develop\nodejs\npm" npm config set cache "D:\sw\develop\nodejs\npm\cache"
Four: Test
npm install express -g
modules
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website! Recommended reading:How to use the Node.js sandbox environment
How to use WebPack to configure vue multi-page
The above is the detailed content of How to operate node.js default npm installation directory. For more information, please follow other related articles on the PHP Chinese website!