How can I change the cache path for npm (or completely disable the cache) on Windows?

后端 未结 5 1209
陌清茗
陌清茗 2020-12-12 12:44

I\'ve installed Node.js on my Windows 7 x64 development machine, the manual way:

mkdir C:\\Devel\\nodejs
cd C:\\De         


        
5条回答
  •  没有蜡笔的小新
    2020-12-12 13:39

    You can change npm cache folder using the npm command line. (see : https://docs.npmjs.com/misc/config and more specifically https://docs.npmjs.com/misc/config#cache)

    So you might want to try this command :

    > npm config set cache C:\Devel\nodejs\npm-cache --global 
    

提交回复
热议问题