要設定 npm 的預設目錄,只要透過 npm config 命令設定 prefix 為指定的位置即可。

npm config set prefix [Path]

1.png