NPM modify download dependency (modify global download and cache path)

method and command

first make sure that node.js is installed successfully

open CMD
input command:
1. Modify cache path

npm config set cache "D:\url\npm-cache"

2. Modify global download:

npm config set prefix "D:\url\npm_global"

so you can put the installation of things in the corresponding disk character, save C disk space!

the corresponding position will appear two folders:


may no NPM – cache this folder at the beginning, but after installing things will appear, such as installation of vue scaffolding, etc.

Read More: