简体   繁体   中英

When you are using VMWare`s share folder to develop node.js project, how to node_modules file?

  1. I am using Windows computer, and my project must run at Linux. So I must use VM.
  2. I also want to use WebStorm. JB Gateway has so many bugs so I don`t want to use it.

So I chosed VMWare share folder function. But unfortunally, unlike Golang, Ruby or other languages, nodejs dependencies will be installed at project folder. Which means If I execute npm install , Linux will try to write files to my share folder.

I tried to use NODE_PATH . In most situation it works. But if you want to use something like angular-cli to boot your project, it doesnt work.

So, how could I download node_modules file properly in VMWare share folder.

  1. Install node_modules at Windows.
  2. Run npm rebuild xxx for deps which are using C++ addons in VMWare.

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