New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPERM while executing nodemon on new Bash on Windows 10 feature #859

Closed
kosinw opened this Issue Jun 16, 2016 · 18 comments

Comments

@kosinw

kosinw commented Jun 16, 2016

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' } }
@wellguimaraes

This comment has been minimized.

Show comment
Hide comment
@wellguimaraes

wellguimaraes Jun 17, 2016

I'm having this problem too. Are you running Win10 on a VM?

wellguimaraes commented Jun 17, 2016

I'm having this problem too. Are you running Win10 on a VM?

@kosinw

This comment has been minimized.

Show comment
Hide comment
@kosinw

kosinw Jun 18, 2016

No, I am just running the new Insider Build with the Bash feature.

kosinw commented Jun 18, 2016

No, I am just running the new Insider Build with the Bash feature.

@tanepiper

This comment has been minimized.

Show comment
Hide comment
@tanepiper

tanepiper Jun 20, 2016

Can confirm I am getting the same issue with Bash On Ubuntu for Windows

tanepiper commented Jun 20, 2016

Can confirm I am getting the same issue with Bash On Ubuntu for Windows

@kosinw

This comment has been minimized.

Show comment
Hide comment
@kosinw

kosinw Jul 9, 2016

No reason for this to be open

kosinw commented Jul 9, 2016

No reason for this to be open

@kosinw kosinw closed this Jul 9, 2016

@tanepiper

This comment has been minimized.

Show comment
Hide comment
@tanepiper

tanepiper Jul 13, 2016

@knwabueze Why? Do you have a solution to this?

tanepiper commented Jul 13, 2016

@knwabueze Why? Do you have a solution to this?

@jdrydn

This comment has been minimized.

Show comment
Hide comment
@jdrydn

jdrydn Jul 15, 2016

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?

jdrydn commented Jul 15, 2016

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?

@kosinw

This comment has been minimized.

Show comment
Hide comment
@kosinw

kosinw Jul 17, 2016

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

kosinw commented Jul 17, 2016

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

@kosinw kosinw reopened this Jul 17, 2016

@jackchammons

This comment has been minimized.

Show comment
Hide comment
@jackchammons

jackchammons Jul 29, 2016

@knwabueze It looks like this is a problem with the Windows Subsystem for Linux. Would you mind filing this issue with us?

https://github.com/Microsoft/BashOnWindows/issues

jackchammons commented Jul 29, 2016

@knwabueze It looks like this is a problem with the Windows Subsystem for Linux. Would you mind filing this issue with us?

https://github.com/Microsoft/BashOnWindows/issues

@YasharF

This comment has been minimized.

Show comment
Hide comment
@YasharF

YasharF Aug 15, 2016

It looks like in cases like with rails, they have workarounds in the meantime. Is there a way to have a workaround for Nodemon?

YasharF commented Aug 15, 2016

It looks like in cases like with rails, they have workarounds in the meantime. Is there a way to have a workaround for Nodemon?

@jopcode

This comment has been minimized.

Show comment
Hide comment
@jopcode

jopcode Nov 7, 2016

same error, some solution? :/, and i don't use zsh or another shell

jopcode commented Nov 7, 2016

same error, some solution? :/, and i don't use zsh or another shell

@YasharF

This comment has been minimized.

Show comment
Hide comment
@YasharF

YasharF Nov 7, 2016

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.

YasharF commented Nov 7, 2016

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.

@Naoto-Ida

This comment has been minimized.

Show comment
Hide comment
@Naoto-Ida

Naoto-Ida Mar 11, 2017

I don't use zsh either, but this still seems to be happening.

Naoto-Ida commented Mar 11, 2017

I don't use zsh either, but this still seems to be happening.

@mrminecart

This comment has been minimized.

Show comment
Hide comment
@mrminecart

mrminecart Jun 16, 2017

Same issue :/

mrminecart commented Jun 16, 2017

Same issue :/

@izikandrw

This comment has been minimized.

Show comment
Hide comment
@izikandrw

izikandrw Sep 5, 2017

this is happening to me TT

izikandrw commented Sep 5, 2017

this is happening to me TT

@whitneyland

This comment has been minimized.

Show comment
Hide comment
@whitneyland

whitneyland Sep 8, 2017

One more status report:

  • Still happening in Windows 10.0.15063.
  • These did not resolve the problem:

        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

whitneyland commented Sep 8, 2017

One more status report:

  • Still happening in Windows 10.0.15063.
  • These did not resolve the problem:

        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

@YasharF

This comment has been minimized.

Show comment
Hide comment
@YasharF

YasharF Sep 11, 2017

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
---- nodemon@1.12.0
---- npm@5.4.1

======= 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

YasharF commented Sep 11, 2017

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
---- nodemon@1.12.0
---- npm@5.4.1

======= 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
@stale

This comment has been minimized.

Show comment
Hide comment
@stale

stale bot Dec 5, 2017

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

stale bot commented Dec 5, 2017

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

@stale stale bot added the stale label Dec 5, 2017

@stale stale bot closed this Dec 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment