3

the commands 'npm install' gives me the following error:

> nodemon@1.18.9 postinstall C:\Users\Nikhil\Music\tab-tracker\server\node_modules\nodemon
> node bin/postinstall || exit 0

npm WARN server@1.0.0 No description
npm WARN server@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! file bashcls
npm ERR! path bashcls
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn bashcls
npm ERR! nodemon@1.18.9 postinstall: `node bin/postinstall || exit 0`
npm ERR! spawn bashcls ENOENT
npm ERR!
npm ERR! Failed at the nodemon@1.18.9 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nikhil\AppData\Roaming\npm-cache\_logs\2018-12-16T19_09_40_364Z-debug.log

As can be seen from the error messages, npm install fails at nodemon@1.18.9 postinstall script. I've tried things like, deleting the node_modules folder and re-running the 'npm install' command again, the same error appears. Also, i tried cleaning the npm cache as suggested by this answer, and it didn't work. Trying to separtely install nodemon gives the same error as above.

lenikhilsingh
  • 440
  • 1
  • 5
  • 17

1 Answers1

0

I have the same problem while I installing

nodemon

in devDependencies for my existing projects in different computer. I do a research and found a solution that helped me to solved this kind for problem. It's happening because of security issues depending on your OS.

Solve this by :

npm install -g nodemon --unsafe-perm=true --allow-root

PS : This too can happen in Electron also, so u can solve by -

npm install -g electron --unsafe-perm=true --allow-root