Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fails on nyc installation #16

Closed
liamegan opened this issue Jul 13, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@liamegan
Copy link

commented Jul 13, 2016

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm WARN chunk-manifest-webpack-plugin@0.1.0 requires a peer of webpack@^1.4.0-beta6 but none was installed.
npm WARN babel-plugin-webpack-loaders@0.7.0 requires a peer of webpack@>=1.12.9 <3.0.0 but none was installed.
npm WARN extract-text-webpack-plugin@1.0.1 requires a peer of webpack@^1.9.11 but none was installed.
npm ERR! Linux 3.13.0-88-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.3.0
npm ERR! npm  v3.10.3
npm ERR! path /test-app/your_new_app/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 '/test-app/your_new_app/node_modules/nyc/node_modules/foreground-child/node_modules/which/bin/which'
npm ERR! enoent ENOENT: no such file or directory, chmod '/test-app/your_new_app/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
@liamegan

This comment has been minimized.

Copy link
Author

commented Jul 14, 2016

Sorry people. This was happening because I was using vagrant and trying to load the project into the synced folder. The problem here is that locking isn't supported when syncing files in this way and so npm install fails (and will fail) in weird places.

To get around this, for anyone else who runs into the same issue and wants both synced files and locally installed node modules, you should create a node modules folder outside of the synced folder and link to it. Something like:

$ mkdir ~/node_modules/
$ cd ~/your_new_app/
$ ln -s ~/node_modules/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.