Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在使用 npm 时遇到问题,问题是,即使我输入了全局标志,npm 仍然会在我的文件夹中-g安装新包。user/AppData/Roaming/npm我怎样才能改变这个?
-g
user/AppData/Roaming/npm
好吧,我认为这是 Windows 上全局模块的默认位置。您可以通过prefix在 config 中定义属性来更改它
prefix
npm config set prefix C:\blahblahblah