Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
npm install fails on nyc installation #16
npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: firstname.lastname@example.org npm WARN email@example.com requires a peer of webpack@^1.4.0-beta6 but none was installed. npm WARN firstname.lastname@example.org requires a peer of webpack@>=1.12.9 <3.0.0 but none was installed. npm WARN email@example.com 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
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/