Fails on Node 7
Closed this issue · 13 comments
I think problem is same as npm/npm#14438
"Same issue with node 7.0.0, downgrade node to 6.9.0 solved that problem."
"I found that to get around that problem I had to:"
- Switch Node from 7.0.0 back to 6.x
- Then run npm -g install npm@next (or whatever version you want)
- Then switch back to Node 7.0.0
> npm-watch
exception in nodemon killing node
Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at evalmachine.<anonymous>:17:20
at Object.<anonymous> (/Users/kristianmandrup/npm/lib/node_modules/nodemon/node_modules/update-notifier/node_modules/configstore/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
----------------------------------------------------------
If appropriate, please file an error with the output from:
$ /usr/local/bin/node /Users/kristianmandrup/npm/bin/nodemon --ext js,jsx --watch src --watch test --exec npm run test --dump
At http://github.com/remy/nodemon/issues/new
----------------------------------------------------------
Thank you for pointing this out.
Unfortunately there does not seem to be a better work around as of yet.
I will leave this issue open for a while, although hopefully it will be fixed soon
Also it should be installed as a global module npm i npm-watch -g
, right?
Or perhaps run locally via npm-run
?
npm i npm-run npm-quick-run -g
I usually install locally and then do npm run watch
@kristianmandrup would it be possible to check if this issue is still occurring for you?
OK, let me try
Just installed latest npm-watch
globally via npm i -g npm-watch
Node v. 7.1
$ npm-watch
/usr/local/lib/node_modules/npm-watch/watch-package.js:96
stdin.stderr.write(message)
^
TypeError: Cannot read property 'stderr' of undefined
at die (/usr/local/lib/node_modules/npm-watch/watch-package.js:96:10)
at watchPackage (/usr/local/lib/node_modules/npm-watch/watch-package.js:16:5)
at Object.<anonymous> (/usr/local/lib/node_modules/npm-watch/cli.js:12:15)
yeah....
that definitely should not be happening.
Will look at it later in the day.
two things that would help:
- What OS are you on
- What is your conifg
I'm on Mac OS Sierra. What config?
the watch
key in your project,json
.
are you just using defaults, or changing settings?
Oh, I forgot about the watch
key. This time I ran the command from a project root with a standard package.json
. Should have a better error/warning in that case.
Very good point. Do you mind opening a new issue to that effect?
What's the status of the issue? Does this work in node 7+?
Node 7 has been EOL'ed
And it has been working for me with 8+