I am using ZSH on the new Bash on Windows 10 and whenever i run nodemon it still runs but it gives me this error and still allows me to use to command line
Command: sudo nodemon index.js
Output: [nodemon] Internal watch failed: watch (current directory) EPERM
Nodemon Dump Output:
[nodemon] 1.9.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
--------------
node: v4.4.5
nodemon: 1.9.2
command: /usr/local/bin/node /usr/local/bin/nodemon index.js --dump
cwd: /mnt/d/sandbox/Web Projects/studious-carnival
OS: linux x64
--------------
{ run: false,
system: { cwd: '/mnt/d/sandbox/Web Projects/studious-carnival' },
required: false,
dirs: [ '/mnt/d/sandbox/Web Projects/studious-carnival' ],
timeout: 1000,
options:
{ dump: true,
ignore:
[ '.git',
'.nyc_output',
'.sass-cache',
'bower_components',
'coverage',
'node_modules',
re: /\.git|\.nyc_output|\.sass\-cache|bower_components|coverage|node_modules/ ],
watch: [ '*.*', re: /.*\..*/ ],
ignoreRoot:
[ '.git',
'.nyc_output',
'.sass-cache',
'bower_components',
'coverage',
'node_modules' ],
restartable: 'rs',
colours: true,
execMap: { py: 'python', rb: 'ruby' },
stdin: true,
runOnChangeOnly: false,
verbose: false,
stdout: true,
execOptions:
{ script: 'index.js',
exec: 'node',
args: [],
scriptPosition: 0,
nodeArgs: undefined,
ext: 'js,json',
env: {},
execArgs: [] },
monitor:
[ '*.*',
'!/mnt/d/sandbox/Web Projects/studious-carnival/.git/**/*',
'!.nyc_output',
'!.sass-cache',
'!bower_components',
'!coverage',
'!/mnt/d/sandbox/Web Projects/studious-carnival/node_modules/**/*' ] },
load: [Function],
reset: [Function: reset],
lastStarted: 0,
loaded: [],
watchInterval: null,
command:
{ raw: { executable: 'node', args: [ 'index.js' ] },
string: 'node index.js' } }
I'm having this problem too. Are you running Win10 on a VM?
No, I am just running the new Insider Build with the Bash feature.
Can confirm I am getting the same issue with Bash On Ubuntu for Windows
No reason for this to be open
@knwabueze Why? Do you have a solution to this?
Yeah I'm also getting this issue, although I reckon it could be more to do with Bash for Windows than actually a nodemon error.
@knwabueze A clearer message would be appreciated, just closing the issue with no real explanation isn't supportive?
Sorry for not clarifying, I couldn't solve it out and just decided it would be better for me to switch to using a different shell. I couldn't do too much I'm still pretty new to Node.js
@knwabueze It looks like this is a problem with the Windows Subsystem for Linux. Would you mind filing this issue with us?
Related: https://github.com/Microsoft/BashOnWindows/issues/723 and https://github.com/Microsoft/BashOnWindows/issues/216
Please vote here to get it fixed in Windows 10 Bash: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13469097-support-for-filesystem-watchers-like-inotify
It looks like in cases like with rails, they have workarounds in the meantime. Is there a way to have a workaround for Nodemon?
same error, some solution? :/, and i don't use zsh or another shell
I can confirm that this is resolved in the latest builds of Windows 10 (I'm running 14959 atm), but those builds are still part of the Fast Ring Insider Preview program, and have other known issues.
I don't use zsh either, but this still seems to be happening.
Same issue :/
this is happening to me TT
One more status report:
1. Microsoft fix (thought to be related) has completed for a while https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13469097-support-for-filesystem-watchers-like-inotify
2. Stopped virus scanning
3. Using Node command prompt admin rights for install
4. Removing readonly permissions from node_modules folder
The original issue was fixed with changes from Microsoft about 10 months ago which got added to the production releases I think about four to five months ago, and I have not had an issue since. Are all of your software including the linux subsystem, system packages (apt-get), and globally installed npm packages up to date? Can you provide log/dump of the output? The following is my current setup which the problem is no longer present in.
======= My Windows version when I open CMD
Microsoft Windows [Version 10.0.15063]
======= My Windows Subsystem for Linux version:
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
======= My linux package status:
$ sudo apt-get update && sudo apt-get upgrade
[sudo] password for {redacted username}:
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 https://cli-assets.heroku.com/branches/stable/apt ./ InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 https://deb.nodesource.com/node_6.x xenial InRelease
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Fetched 204 kB in 1s (120 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libegl1-mesa libgbm1 libgl1-mesa-dri libmirclient9 libwayland-egl1-mesa
nodejs
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
======= My node version:
$ nodejs -v
v6.11.2
======= My global npm update status:
$ sudo npm update -g
{blank response since everything was up to date}
======= My global npm packages and their versions:
$ sudo npm list -g --depth=0
/usr/lib
---- [email protected]
---- [email protected]
======= What I am getting when I run nodemon:
/mnt/c/temp/myProject$ nodemon
[nodemon] 1.12.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
Listening on port 3001
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3
Most helpful comment
The original issue was fixed with changes from Microsoft about 10 months ago which got added to the production releases I think about four to five months ago, and I have not had an issue since. Are all of your software including the linux subsystem, system packages (apt-get), and globally installed npm packages up to date? Can you provide log/dump of the output? The following is my current setup which the problem is no longer present in.
======= My Windows version when I open CMD
Microsoft Windows [Version 10.0.15063]======= My Windows Subsystem for Linux version:
======= My linux package status:
======= My node version:
======= My global npm update status:
======= My global npm packages and their versions:
======= What I am getting when I run nodemon: