nodemon: [nodemon] unable to run executable: "npm" on Windows 8

I’m trying to do something like:

"scripts": {
  "test-nodemon": "nodemon -w spec -e js -x \"npm -v\""

in my package.json. This works on Mac but I get an error on Windows. I’m running through git bash (I’ve tried cmd.exe and get the same error). I’m having trouble figuring out if it’s on the path in that spawned environment. Obviously it’s on the path of the parent process otherwise I wouldn’t be able to run npm run test-nodemon.

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 21 (5 by maintainers)

Commits related to this issue

Most upvoted comments

This is weird, because there’s nothing that affects windows in the diff between 1.3.0-7 and 1.3.x. It only includes linux specific fixes (that were merged via a different branch).

Can someone put together a simple test that I can run in my windows environment (I’ll try both cmd.exe and git bash). Equally, if anyone wants to take a crack at a PR, I’d be super grateful!