npm install got error on vagrant
See original GitHub issueNPM version: 3.10.2 NODE version: v4.4.0 I got this error when run npm install:
npm ERR! Linux 3.13.0-85-generic
npm ERR! argv "/home/vagrant/.nvm/versions/node/v4.4.0/bin/node" "/home/vagrant/.nvm/versions/node/v4.4.0/bin/npm" "install"
npm ERR! node v4.4.0
npm ERR! npm v3.10.2
npm ERR! path /vagrant/mern-starter/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/mern-starter/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which'
npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/mern-starter/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /vagrant/mern-starter/npm-debug.log
then I try to run npm start
And get this
/vagrant/mern-starter/node_modules/babel-core/lib/transformation/file/index.js:591
throw err;
^
Error: /vagrant/mern-starter/server/server.js: Cannot find module '../features'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/vagrant/mern-starter/node_modules/caniuse-api/dist/index.js:19:32)
at Module._compile (module.js:409:26)
at Module._extensions..js (module.js:416:10)
at Object.require.extensions.(anonymous function) [as .js] (/vagrant/mern-starter/node_modules/babel-register/lib/node.js:166:7)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
[nodemon] app crashed - waiting for file changes before starting...
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
npm doesn't work in vagrant · Issue #7308 - GitHub
Hey guys, hit this issue yesterday and found out that you can get around it by creating a symlink of your ./node_modules directory...
Read more >npm install modules throwing an ENOENT error within local ...
I have tried: - Destroying my vagrant box and reinstalling it - reinstalling npm, node and nvm (a few times - which apparently...
Read more >How to fix 'npm install' errors on vagrant on windows because ...
The gist of this story is that npm install in a vagrant virtual environment sometimes makes some REALLY long paths and it makes...
Read more >Homestead - npm install error - Laracasts
First, do "vagrant halt", then go to the project file, right click and open the terminal, then "npm install" will install it.
Read more >Install nodejs and run yarn install as part of Vagrant provision
As I thought may happen, the out of the box settings give symlink related errors when running Vagrant on a Windows host, since...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just tried @liamegan 's suggestion in https://github.com/Hashnode/mern-cli/issues/16.
npm install
now run successfully in my vagrant.Need to change permision for the node_modules too
sudo chown -R $USER:$GROUP ~/node_modules
then do
npm install
I had a similar problem but the error was related to
syscall open
rather thansyscall chmod
. There is some problem with shared folder as stated above. I followed @amoshydra’s steps above, without runningchmod
, and modules installed. Thanks @amoshydra!Still the root cause of this issue is not known! Hope someone can find it.