简体   繁体   中英

Transfering node modules to the global location

我想知道将可能安装在一台计算机中的节点模块转移到另一台计算机的global modules文件夹中是否会产生与直接从该计算机上的Internet安装不同的效果?

It will. Versions to not match with newer global modules , and if some modules not installed, they don't just work. I don't think it is any sort of good practice. It is recommended to install modules in secondary system traditionally by CLI.

Some node modules are OS dependent. For instance, a lot of libraries work differently in different operating systems and they need to be installed with right privileges and configurations. It might work if you transfer the node_modules dir from one system to another that has a similar OS setup but it's generally not advisable.

And of course, there's no caching or anything for node_modules . They're just files in folders.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM