在開發過程中我們可能希望重新設置npm的全局路徑,具體方法如下: npm config set cache "D:/nodejs/node_cache" npm config set prefix "D:/nodejs/node_global"