[英]Where does Node.js search for modules when no node_modules folder included in project?
[英]When you are using VMWare`s share folder to develop node.js project, how to node_modules file?
所以我选择了 VMWare 共享文件夹 function。但不幸的是,与 Golang Ruby 或其他语言不同,nodejs 依赖项将安装在项目文件夹中。 这意味着如果我执行npm install
, Linux 将尝试将文件写入我的共享文件夹。
我尝试使用NODE_PATH
。 在大多数情况下它都有效。 但是如果你想使用像 angular-cli 这样的东西来启动你的项目,它是行不通的。
那么,如何在 VMWare 共享文件夹中正确下载node_modules
文件。
npm rebuild xxx
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.