Hashnode / mern-cli

⛔️ DEPRECATED - A cli tool for getting started with MERN
http://mern.io/
MIT License
572 stars 149 forks source link

npm install fails on nyc installation #16

Closed liamegan closed 8 years ago

liamegan commented 8 years ago
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 commented 8 years ago

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/