Skip to content
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

v12 Promise rejection, v7 never restarting #1914

Closed
GusGF opened this issue Sep 13, 2021 · 8 comments
Closed

v12 Promise rejection, v7 never restarting #1914

GusGF opened this issue Sep 13, 2021 · 8 comments

Comments

@GusGF
Copy link

GusGF commented Sep 13, 2021

I'm about to give up on this after 2 wasted days of getting nowhere. Installed nodemon v2.0.12 globally then degraded to v2.0.7 to fix the promise rejection. On the lower version I continue to see a message saying that it's restarting due to changes . . . it just never does.

Checked environment variables i.e. system32 for Windows installs
Tried several reboots
Tried the consoles native cmd, git bash, native powershell & VSCode(powershell & cmd)

People are saying it's Windows 10 causing the problem but what exactly and how do I find out? Is there anyway of discovering what the issue is through running nodemon in debug mode or at least rule out certain things?

I tried to your documentation here on Github here but I found it didn't contain many of the nodemon commands I discovered elsewhere on the internet, on the whole the docs didn't help at all. It would have been great if they'd provided debugging support so users could at least try to do their own troubleshooting.

If I could get help on the debugging side and maybe reinstall the latest version again and take it from there, that would be great.

Node v14.15.4
NPM v6.14.10
Nodemon v2.0.12 but now reverted to v2.0.7
Windows 10 Pro 21H1

@remy
Copy link
Owner

remy commented Sep 13, 2021

Do you want to give a few minutes to try the nodemon@debug version? I suspect you've made a duplicate issue for something that's in the works to fix - but I've not had the time to dig in and finalise a test and release for the fix.

Others might be able to offer suggestions on exact version to revert to (though sounds like you're pinned for now on .7) - and since it's just me, I've got to fit fixes between IRL stuff - but it is coming!

@GusGF
Copy link
Author

GusGF commented Sep 14, 2021

@remy yep tried the debug version but still seeing

[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...

...and edits not cascading to the web page after a manual refresh. Is there any actual debugging I can do so you can see whats going on?

@remy
Copy link
Owner

remy commented Sep 15, 2021

@GusGF there's two levels of debug, you can use the -V for verbose which should tell you what's triggering the restart.

There's also the env value of DEBUG=nodemon,nodemon:* - I can't remember how to set it in Windows (I'm primarily a mac user) but a quick web search will help. That will give you detailed blow by blow events on what's going on inside nodemon - useful for me to debug with.

@GusGF
Copy link
Author

GusGF commented Sep 15, 2021

Here's my code in index.js:

const express = require('express');
const app = express();
app.get('/', (req, resp) => {
    resp.send("Hi!!")
})
app.listen(3000, () => {
    console.log("Listening on port 3000")
})
$ nodemon -V index.js
[nodemon] 2.0.13-alpha.1
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 18360 to restart
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
[nodemon] forking
[nodemon] child pid: 3904
[nodemon] watching 3 files
Listening on port 3000

Everytime I save my index.js regardless of whether I've made changes or not this is generated and sometimes it repeats??!

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

_

There's also the env value of DEBUG=nodemon,nodemon:* - I can't remember how to set it in Windows

_
Okay I've tried this:

$ set DEBUG=* & nodemon index.js
[1] 1266
[nodemon] 2.0.13-alpha.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
Listening on port 3000
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...
[nodemon] restarting due to changes...

What am I supposed to be seeing that's different with debug?

For the time being whilst I can't get Nodemon to work I'm using Supervisor, so far so good.

@remy
Copy link
Owner

remy commented Sep 22, 2021

I'm going to clsoe as you have a work around. I can't replicate and this is the same as the others have reported, but no one has been able to tell me which terminal is being used (since unhelpfully Windows has several these days of totally different flavours).

@GusGF
Copy link
Author

GusGF commented Sep 22, 2021

I've tried Powershell, Git Bash & the standard Windows 10 command prompt.

@remy
Copy link
Owner

remy commented Sep 22, 2021

If you can replicate in all these shells then there's something else at play - I can't replicate at all, you can see my screenshot here: #1903 (comment) - happy to continue in that thread for now - anything you can add will be valuable.

@GusGF
Copy link
Author

GusGF commented Sep 22, 2021

Okay thanks.

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

No branches or pull requests

2 participants