开发者

node npm local install override global install

开发者 https://www.devze.com 2023-04-05 23:38 出处:网络
If I have node modules installed locally (in the same fold开发者_Python百科er as my node app) will they override global installations of the same modules?Yes. See the documentation here on module reso

If I have node modules installed locally (in the same fold开发者_Python百科er as my node app) will they override global installations of the same modules?


Yes. See the documentation here on module resolution. And, just to be clear, "override" here simply means that the local module is the one that will be resolved to. The global module will be left untouched, and node.js apps in other directories will still be able to use the global module.


Edit: it would probably also help to better understand how the global installs with npm work. More info on that is [here](https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/).
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号