nodemon 1.18.9 not working in windows 10 *64

Created on 9 Jan 2019  ·  48Comments  ·  Source: remy/nodemon

I have installed nodemon
_npm install nodemon --g_
and the server is starting as it is suppose to but then while i change in my file
it says
_restarting due to changes..._
and nothing other then this line and the weird thing is
the server didnot restart i have restarted my pc tried updating the nodemon my friend is using same thing and in his computer it worked but not mine. I m not sure what the isuue is.
Can anyone help me here.
nodemon index.js [nodemon] 1.18.9 [nodemon] to restart at any time, enterrs [nodemon] watching: *.* [nodemon] startingnode index.js the app is running.... [nodemon] restarting due to changes...

needs more info stale windows

Most helpful comment

@remy sorry for the delay - I've just set up a simple package with nothing but nodemon and the basic "hello world" app.js file. I'm using nodemon as a dev dependency, and my yarn start is set to nodemon app.js.
When I start it, I get the usual message:

 ⨯ Lemuel Cushing@CUTHBERT  C\..\nodemon_test  yarn start
yarn run v1.13.0
$ nodemon app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
Server running at http://127.0.0.1:3000/

When I make a change to app.js and save it, I get
[nodemon] restarting due to changes...
Which just hangs.

If I add the -V flag, the follwing is displayed:

 Lemuel Cushing@CUTHBERT  C\..\nodemon_test  yarn start
yarn run v1.13.0
$ nodemon -V app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 34116 to restart
[nodemon] watching: *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node app.js`
[nodemon] forking
[nodemon] child pid: 10640
[nodemon] watching 3 files
Server running at http://127.0.0.1:3000/

And after I save a change:

[nodemon] files triggering change check: app.js
[nodemon] matched rule: **\*.*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] app.js

[nodemon] files triggering change check: app.js
[nodemon] matched rule: **\*.*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] app.js

All 48 comments

I have this exact problem! it works on my macbook but not in my windows.... =_=

I am also facing the same problem on windows 8.1 and nodemon version 1.18.9

Care to debug rather than "me too"? Happy to take PRs that will fix or even some actual debugging information to replicate and fix…

I got this glitch after installing the latest update of nodemon. So I tried to revert back to the old version and it doesn't do anything. I think the update does something on the windows operating system that cannot remove even after uninstall and installing (reinstall) the nodemon package.
I believe the problem can be solve by reinstalling the os as stated on the previous Issue, https://github.com/remy/nodemon/issues/1461#issuecomment-442487389 but this isn't an efficient fix.

I tries debugging by reverting back to old versions... and guess what?
For windows machine, please stick with version 1.17.15. It is working well and will fix the bug.
Use npm i -g [email protected] hope that helps.

Those old versions also include deep vulnerabilities, which is why older versions are not supported.

I am using version 1.17.15 for about an hour now and it was stuck at restarting due to changes. The same issue in version 1.18.x.
It stopped working after a trying to save changes multiple times before the "Starting node app.js" message appear.
The problem is somewhat hard to figure out since the installation also WARNs about the optional module fsevent not being able to install.

Hello everyone,

some goes for OSX. Info nodemon is installed locally, not globally.
node -v v8.15.0 npx nodemon -v 1.18.9

We had this in #1435.

Edit:
Tried to add a nodemon.json (with and without --config) as well as adding config to the package.json

Cheers,
Daniel

Same here, been looking for a solution all over. Windows 10, reverting to @1.17.15 didn't make a difference

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

Can you all retest with [email protected] - it might fix the issue you were seeing.

Otherwise, since there's been no interest in finding the source of the issue on this thread, I'll close it in a few days.

Hi @remy, I've upgraded to 1.18.10, but to no avail..

@LemuelCushing can you detail what you're seeing and how you're able to replicate with as little code as possible?

If you want to use nodemon on Windows 10 but can't get it to work globally you can always install it as a dev dependency, cd into your project directory, and run yarn run nodemon and it will function the same. Hope that helps.

@remy sorry for the delay - I've just set up a simple package with nothing but nodemon and the basic "hello world" app.js file. I'm using nodemon as a dev dependency, and my yarn start is set to nodemon app.js.
When I start it, I get the usual message:

 ⨯ Lemuel Cushing@CUTHBERT  C\..\nodemon_test  yarn start
yarn run v1.13.0
$ nodemon app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
Server running at http://127.0.0.1:3000/

When I make a change to app.js and save it, I get
[nodemon] restarting due to changes...
Which just hangs.

If I add the -V flag, the follwing is displayed:

 Lemuel Cushing@CUTHBERT  C\..\nodemon_test  yarn start
yarn run v1.13.0
$ nodemon -V app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 34116 to restart
[nodemon] watching: *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node app.js`
[nodemon] forking
[nodemon] child pid: 10640
[nodemon] watching 3 files
Server running at http://127.0.0.1:3000/

And after I save a change:

[nodemon] files triggering change check: app.js
[nodemon] matched rule: **\*.*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] app.js

[nodemon] files triggering change check: app.js
[nodemon] matched rule: **\*.*
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] app.js

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

I'm having same issue on Windows Server 2016. I've tried nodemon globally and locally and no luck. If I run in verbose mode it says watching 0 files despite having my app.js file clearly present. It also reads that it's watching . with extensions: js,mjs,json ... anybody having luck with this?

The issue is with chokidar since 2.1.3. See https://github.com/paulmillr/chokidar/issues/812

This can be fixed in nodemon by setting atomic to false in the options for chokidar.watch.

Fixed chokidar.

Star, I'll push a bumpped version of nodemon to pull the updated dep
(others: you sho be able to reinstall nodemon and it should pick up the
latest change in chokidar.

On Fri, 22 Mar 2019, 21:20 Paul Miller, notifications@github.com wrote:

Fixed chokidar.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/remy/nodemon/issues/1501#issuecomment-475787338, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAA1hMypfdYk6PZ2pP65KSiFiyf92TTpks5vZUkpgaJpZM4Z3Z_V
.

I'm having a similiar issue in Windows 10 Pro and [email protected]. I'm using the command:

yarn cross-env NODE_ENV=development nodemon --watch dist-dev --inspect dist-dev/lib/index.js

Nodemon is not restarting when a file is modified 😢. I installed version 1.18.0 and this command works like a charm. 🐱‍🐉

@d4rth-v4d3r What do you get when you run this?

npm ls | findstr "chokidar"

If you see [email protected] or [email protected], then that's your problem. It needs to be [email protected] or later.

Star, I'll push a bumpped version of nodemon to pull the updated dep (others: you sho be able to reinstall nodemon and it should pick up the latest change in chokidar.

@remy Can you bump the chokidar dependency to 2.1.5? Currently, reinstalling nodemon doesn't work if [email protected] is already in the dependency tree either directly or from another package.

For example, if I run npm i -D [email protected], reinstalling nodemon is not going to pull down [email protected]. It's just going to use 2.1.3, which has the bug.

Nuking node_modules and reinstalling should work, but only if another package hasn't pinned [email protected].

This is my output

| +-- [email protected]
| +-- [email protected] extraneous

@d4rth-v4d3r That's strange. What are the dependencies and devDependencies in package.json?

"dependencies": {
        "apollo-server": "^2.4.8",
        "apollo-server-express": "^2.4.8",
        "body-parser": "^1.18.2",
        "cors": "^2.8.4",
        "dataloader": "^1.4.0",
        "dataobject-parser": "^1.2.1",
        "express": "^4.16.3",
        "express-graphql": "^0.6.12",
        "graphql": "^0.13.2",
        "graphql-compose": "^4.3.0",
        "graphql-date": "^1.0.3",
        "http-status-codes": "^1.3.2",
        "humps": "^2.0.1",
        "jsonwebtoken": "^8.5.0",
        "lodash": "^4.17.10",
        "moment": "^2.22.1",
        "mongo-ts-wrapper": "^2.3.0",
        "mongodb": "^3.0.7",
        "mongodb-migrations": "^0.8.5",
        "mongoose": "^5.5.0",
        "mssql": "^4.1.0",
        "node-cron": "^1.2.1",
        "node-yaml-config": "^0.0.4",
        "p-iteration": "^1.1.7",
        "passport": "^0.4.0",
        "passport-jwt": "^4.0.0",
        "pouch-ts-wrapper": "2.0.1",
        "pouchdb": "6.4.3",
        "pouchdb-find": "6.4.3",
        "pouchdb-server": "4.0.1",
        "reflect-metadata": "^0.1.12",
        "sequelize": "^4.37.10",
        "sequelize-typescript": "^0.6.5",
        "serialize-error": "^3.0.0",
        "sql-template-strings": "^2.2.2",
        "token-gen": "^0.5.0",
        "typed-rest-client": "^1.0.7",
        "winston": "^3.0.0"
    },
    "devDependencies": {
        "@types/express": "^4.16.1",
        "@types/express-graphql": "^0.6.2",
        "@types/jest": "^23.0.0",
        "@types/jsonwebtoken": "^8.3.2",
        "@types/lodash": "4.14.109",
        "@types/mongodb": "^3.0.19",
        "@types/mongoose": "^5.3.25",
        "@types/node-cron": "^1.2.0",
        "@types/passport": "^1.0.0",
        "@types/passport-jwt": "^3.0.1",
        "@types/pouchdb": "^6.3.2",
        "babel-cli": "^6.26.0",
        "babel-core": "^6.26.3",
        "babel-eslint": "^8.2.3",
        "babel-jest": "^22.4.3",
        "babel-plugin-syntax-async-functions": "^6.13.0",
        "babel-plugin-syntax-async-generators": "^6.13.0",
        "babel-plugin-transform-class-properties": "^6.24.1",
        "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
        "babel-plugin-transform-es2015-template-literals": "^6.22.0",
        "babel-plugin-transform-flow-strip-types": "^6.22.0",
        "babel-plugin-transform-object-rest-spread": "^6.26.0",
        "babel-preset-env": "^1.7.0",
        "babel-preset-es2015": "^6.24.1",
        "babel-preset-stage-0": "^6.24.1",
        "babel-preset-stage-2": "^6.24.1",
        "beautify-benchmark": "^0.2.4",
        "benchmark": "^2.1.4",
        "coveralls": "^3.0.1",
        "cross-env": "^5.2.0",
        "eslint": "^4.19.1",
        "eslint-plugin-babel": "^5.1.0",
        "eslint-plugin-flowtype": "^2.46.3",
        "eslint-plugin-prettier": "^2.6.0",
        "eslint-plugin-react": "^7.7.0",
        "flow-bin": "^0.71.0",
        "isparta": "^4.0.0",
        "jest": "^23.0.0",
        "node-fetch": "^2.2.0",
        "nodemon": "1.18.0",
        "pouchdb-adapter-memory": "^7.0.0",
        "prettier": "^1.12.1",
        "regenerator-runtime": "^0.11.1",
        "sane": "^2.5.0",
        "ts-jest": "^23.0.0",
        "typescript": "^3.3.3333"
    }

@d4rth-v4d3r your version of nodemon is 1.18.0 not the latest.

@jordanbtucker thank you for your support on this thread - much appreciated 👍 ❤️

I'm pushing a release that upgrades chokidar directly - though most users should get the dep upgrade automatically as it pulls chokidar@^2.1.0

@d4rth-v4d3r I installed your dependencies. I was able to get it working by reinstalling nodemon.

npm uninstall --save-dev nodemon
npm install --save-dev nodemon

Since nodemon is the only dependency that requires [email protected], [email protected] will also get reinstalled at the latest version. Note that this is different than npm update nodemon as that won't necessarily update chokidar, at least not until remy bumps the chokidar dependency in nodemon.

@remy I revert from version 1.18.10 to 1.18.0 because it was not working

I'm having this issue with 1.19.0, windows 10 64bits also.

@victorblq What do you get when you run this?

npm ls | findstr "chokidar"

I just want to rule out whether it's an issue with chokidar.

@jordanbtucker this:

$ npm ls | findstr "chokidar"
  +-- [email protected]

Thanks. How about this?

npx cross-env DEBUG=nodemon nodemon -V -w dir dir

Replace dir twice with the name of the directory you want to watch. Make sure there's at least one .js file in that directory.

I'm following an expressjs tutorial, if I run:

yarn start

it works, but not refresh with code changes (this original issue)
and when I run with yout snippet, replacing "dir" with "src", that in my case contains a index.js file, I get this:

$ npx cross-env DEBUG=nodemon nodemon -V -w src src
npx: instalou 10 em 1.335s
  nodemon bus new listener: reset (0) +0ms
  nodemon bus new listener: reset (0) +1ms
  nodemon bus new listener: quit (0) +8ms
  nodemon bus new listener: quit (0) +0ms
  nodemon bus new listener: restart (0) +0ms
  nodemon bus new listener: restart (0) +0ms
  nodemon bus new listener: reset (2) +3ms
  nodemon bus emit: reset +1ms
  nodemon resetting watchers +0ms
  nodemon reset +0ms
  nodemon config: dirs [ 'C:\\Users\\victo\\Workspaces\\express\\src' ] +0ms
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
  nodemon bus new listener: error (0) +44ms
  nodemon bus new listener: error (0) +0ms
[nodemon] or send SIGHUP to 16560 to restart
[nodemon] watching: C:\Users\victo\Workspaces\express\src/**/*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node src`
[nodemon] forking
  nodemon fork C:\Windows\system32\cmd.exe /d /s /c node src +0ms
[nodemon] child pid: 18212
  nodemon bus new listener: exit (0) +8ms
  nodemon bus new listener: exit (0) +0ms
  nodemon start watch on: [ 'src', re: /src/ ] +1ms
  nodemon start watch on: C:\Users\victo\Workspaces\express\src +53ms
  nodemon ignored [
  '**/.git/**',
  '**/.nyc_output/**',
  '**/.sass-cache/**',
  '**/bower_components/**',
  '**/coverage/**',
  '**/node_modules/**',
  re: /.*.*\/\.git\/.*.*|.*.*\/\.nyc_output\/.*.*|.*.*\/\.sass\-cache\/.*.*|.*.*\/bower_components\/.*.*|.*.*\/coverage\/.*.*|.*.*\/node_modules\/.*.*/
] +0ms
  nodemon watch is complete +37ms
[nodemon] watching 1 file
C:\Users\victo\Workspaces\express\src\index.js:1
import express from 'express';
       ^^^^^^^

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:718:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
    at internal/main/run_main_module.js:17:11
[nodemon] app crashed - waiting for file changes before starting...

actually, I'm working at my laptop now(Linux) and everything is fine. Logged at my desktop(Windows) just to test your solution in case of anyone need it.

This looks like a different issue since it's actually watching the file:

[nodemon] watching 1 file

The error you're getting is because it needs to be transpiled with something like babel.

Try this:

npx cross-env DEBUG=nodemon nodemon -V -w src --exec babel-node src

I had the same issue Windows 10, for whatever reason nodemon wont run on some of my projects,

here's a duck-tape work around, ask npm to run a nodemon script in package.json
"scripts": { "dev": "nodemon server" },

then just run npm run dev
currently works for me

using
"nodemon": "^1.19.1"

another thing that worked for me was deleting the package-lock.json (make a copy if you scared) then closing all text editors/ide's & terminals associated with the application and opening them again and run npm install in the terminal to reload package-lock.json. This allowed me to use nodemon and ng commands (was having issues with ng too)

@shahidfoy Just running nodemon will run the global install of nodemon. You can find out what version that is by running npm ls -g nodemon. Running npm run dev will run the version of nodemon installed in node_modules. That's probably why you're seeing different behavior.

I had the same problem on win 7. The issue was founded accidentally. My solution was adding C:\Windows\System32\ to the system variable in the PATH.

This worked for me!

npm install -g nodemon

npm install --save-dev nodemon

npm config get prefix

set PATH=%PATH%;C:\Users\"Your User"\AppData\Roamingnpm;

Source:
https://cursos.alura.com.br/forum/topico-nao-consigo-instalar-o-nodemon-23149

You should run PowerShell as administrator then:
PS C:\WINDOWS\system32> Set-ExecutionPolicy RemoteSigned
and press A

I had the same problem on win 7. The issue was founded accidentally. My solution was adding C:\Windows\System32\ to the system variable in the PATH.

it also worked for me in windows 10 64bit

I'm having the same problem, can you help me please??? How can i solve it???

add C:\Windows\System32\ in your path in envrionment variable

On Tue, 18 Feb, 2020, 8:30 AM felipe, notifications@github.com wrote:

I'm having the same problem, can you help me please??? How can i solve
it???


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/remy/nodemon/issues/1501?email_source=notifications&email_token=AOJPIEAHG7K7HX7G6ZKQW7TRDNFM7A5CNFSM4GO5T7K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMALXAY#issuecomment-587250563,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJPIEC5FV77VKRT5MFPRY3RDNFM7ANCNFSM4GO5T7KQ
.

@remy sorry for the delay - I've just set up a simple package with nothing but nodemon and the basic "hello world" app.js file. I'm using nodemon as a dev dependency, and my yarn start is set to nodemon app.js.
When I start it, I get the usual message:

⨯ Lemuel Cushing@CUTHBERT  C..nodemon_test  yarn start
yarn run v1.13.0
$ nodemon app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node app.js
Server running at http://127.0.0.1:3000/
When I make a change to app.js and save it, I get
[nodemon] restarting due to changes...
Which just hangs.

If I add the -V flag, the follwing is displayed:

Lemuel Cushing@CUTHBERT  C..nodemon_test  yarn start
yarn run v1.13.0
$ nodemon -V app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter rs
[nodemon] or send SIGHUP to 34116 to restart
[nodemon] watching: .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node app.js
[nodemon] forking
[nodemon] child pid: 10640
[nodemon] watching 3 files
Server running at http://127.0.0.1:3000/
And after I save a change:

[nodemon] files triggering change check: app.js
[nodemon] matched rule: **.
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] app.js

[nodemon] files triggering change check: app.js
[nodemon] matched rule: **.
[nodemon] changes after filters (before/after): 1/1
[nodemon] restarting due to changes...
[nodemon] app.js

@LemuelCushing Can you solve it???

Send me a message to [email protected], if you can please

Can you all retest with [email protected] - it might fix the issue you were seeing.

Otherwise, since there's been no interest in finding the source of the issue on this thread, I'll close it in a few days.

@remy I retested it but when I update the file and make a new request I get the previous result, even with the nodemon running.

Note: I started getting this problem with the latest version of the nodemon: 2.0.2

@remy

It seems that this problem has returned, the nodemon even runs the application, but after I change a file and save the request executed by Insomnia (a program like the postman) it returns the same value as before.

BEFORE CHANGING THE NORMAL EXECUTE FILE:
image

NOTICE THAT AFTER I CHANGE FROM "CLÁUDIO" TO "ROBSON" THE ANSWER IN INSOMNIA:
image

Help me please. I've searched a lot on the internet but I think this is the right place.

https://github.com/remy/nodemon/issues/1619#issuecomment-544145862 .... That link has the answer.

  1. Start Windows PowerShell with the "Run as Administrator" option. Only members of the
    Administrators group on the computer can change the execution policy.

  2. Enable running unsigned scripts by entering:

    set-executionpolicy remotesigned

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mohammad-Quanit picture Mohammad-Quanit  ·  5Comments

dimsmol picture dimsmol  ·  4Comments

Exeteres picture Exeteres  ·  4Comments

medoix picture medoix  ·  4Comments

jonerer picture jonerer  ·  4Comments