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
upon updating to 2.0.9^ Unhandled promise rejection warning on save while running nodemon. #1875
Comments
I have the same problem of an unhandled exception when I save on Windows 10, nodemon 2.0.9, node 14.16.1.
|
@0neMiss ignoring the promise exception for a moment, does nodemon behave as you'd expect otherwise? |
@remy no, sorry if that was unclear. It doesn't restart nodemon on save, unless there is a compiling error, then it will actually restart with the changes. Otherwise it will throw this error and not restart with changes. I edited my comment above but ill mention it here too, the promise rejection warning begins to happen on 2.0.8-alpha.a and higher. I also checked versions from 2.0.7 to 1.19.4 and nodemon fails to restart on save on those versions as well but with no error. |
Can you install |
I tried this but the error is still there. |
@SmitBhamwala you still see an unhandled exception? Can you paste what you're seeing (and paste the result of I can't resolve this without other people testing - the feature was added via a user PR and I in the version of Windows I have to test with everything was fine - so looking to you folk to cross check with me. |
Sending you this screenshot with version and error. |
@SmitBhamwala okay, as per my post before yours, you'll need to update to the debug build via |
@remy I already tried that debug build too but still error is there |
That is weird. The execSync that you can see in the output is actually wrapped in a try/catch in that debug build so something extra odd is happening. Can you share the program you're using to run nodemon (ie. Is it command prompt, powershell, etc and any version numbers too) - I'll try to replicate this weekend |
@remy I am using Git Bash on Hyper Terminal (Version 3.0.2) and I also tried Git Bash on Microsoft VS code's inbuilt terminal (VS Code version 1.57.1) OS: Windows 8.1 Pro |
@remy I am also using Git Bash I also tried VS code's built in terminal using powershell as well no luck. I also tried using yarn instead of npm and still no luck. Git version: 2.24.0.windows.2 Let me know if you need anything else! |
Hey @remy , I tried with the debug build, it is still showing me the error. I have tried it with PowerShell and Gitbash both, but the error is still comming. |
Thanks for trying, still no fix for me. I'll try a fresh install of windows or restoring back to an image when I get a chance. |
I tried the 2.0.10-alpha2 but it is still showing me the same error. |
I need more details - @indranil786 can you provide as much detail as I provided in my screenshot post? |
Bit more context: the throwing shouldn't be happening because the call is being wrapped in a try/catch, so this tells me, if others are still seeing the error, that there's some exception in the system combination - and the problem with Windows setup is that there's so many combinations. Hence why I need as much information about setup and versions as possible. |
It's not necessary, but I ran with the env value |
I've pushed the latest fixes to nodemon@2.0.10 - please test - I'll close this issue shortly if either there's no response or if there's no details on "doesn't work for me". Cheers all. |
Hey @remy I installed the 2.0.10 version, and the problem is still showing.
on bash on cmd on powershell version - 5.1.19041.1023 The --dump file --------------
node: v14.16.1
nodemon: 2.0.10
command: C:\Program Files\nodejs\node.exe C:\Users\asus\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js --dump index.js
cwd: C:\Users\asus\Desktop\nodeMon-test
OS: win32 x64
--------------
{
run: false,
system: { cwd: 'C:\\Users\\asus\\Desktop\\nodeMon-test' },
required: false,
dirs: [ 'C:\\Users\\asus\\Desktop\\nodeMon-test' ],
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: /.*\..*/ ],
monitor: [
'*.*',
'!**/.git/**',
'!**/.nyc_output/**',
'!**/.sass-cache/**',
'!**/bower_components/**',
'!**/coverage/**',
'!**/node_modules/**'
],
ignoreRoot: [
'**/.git/**',
'**/.nyc_output/**',
'**/.sass-cache/**',
'**/bower_components/**',
'**/coverage/**',
'**/node_modules/**'
],
restartable: 'rs',
colours: true,
execMap: { py: 'python', rb: 'ruby', ts: 'ts-node' },
stdin: true,
runOnChangeOnly: false,
verbose: false,
signal: 'SIGUSR2',
stdout: true,
watchOptions: {},
execOptions: {
script: 'index.js',
exec: 'node',
args: [],
scriptPosition: 0,
nodeArgs: undefined,
execArgs: [],
ext: 'js,mjs,json',
env: {}
}
},
load: [Function (anonymous)],
reset: [Function: reset],
lastStarted: 0,
loaded: [],
watchInterval: null,
signal: 'SIGUSR2',
command: {
raw: { executable: 'node', args: [ 'index.js' ] },
string: 'node index.js'
}
}
-------------- |
I just tried 2.0.10, its the same error for me, I'm personally going to be moving on to trying to figure out if its something in my local environment. I'll let you know if I find anything. Thanks so much for trying @remy |
@0neMiss I'm fairly certain it's not your environment as others are seeing the same thing - but I do know that I can't replicate (i.e. it doesn't show the stack), so it's possible it's linked to combination of versions. For instance, does your env have anything in common with @indranil786's environment? |
We appear to have the same PowerShell version but outside of that i dont see anything --dump
|
I think both of us (@0neMiss ) have the same environment . PowerShell version is same. Although the git bash version is different and the windows build. But i don't think that it will be of any problem as in both the systems its not working. |
Finally, I found this is another issue encountered a year before. |
@DineshRout779 I'm pushing nodemon@2.0.11 to address this last issue you hit. And closing the main issue now 👍 |
I managed to replicate it by disabling Windows Management Instrumentation service. docs. its a windows problem |
looks like everyone is having this issue, I will wait for an update then |
NO, the problem is not linked with nodemon. It is linked with windows. Please make sure you have the system32 path specified in the system environment variable. |
finish checking environment variables from Windows 10; apparently everything is fine but the error in nodemon persists; I don't know if you could tell me where exactly you modify the environment variables. |
Right click on This PC > properties > advanced settings > environment variables > Choose path in system. Make sure you have system32 path included. |
Can send a print of who u config environment variables? I tried to add system32 to env in several different ways and nodemon didn't work again |
How to do that? https://prnt.sc/1p8qkqm |
I'm having the same issue and not sure where to add the system32 path to the Environment Variables. Please advise! |
Yes just click ok and try. |
@remy,@DineshRout779 Is that works for window 10 properly? |
I think you should re install nodejs and try. Adding system32 path solved for me earlier when I was on a windows 7 machine. |
I was confused because I already have the path in my Environment system. Also completed uninstalled node as well with the issue remaining. Thanks for replying! |
I solved this problem by uninstalling nodemon version 2.0.12 and then installing 2.0.7 |
When I did that my nodemon continued to fail restarting albeit with no error message this time. it just froze at |
Those error are not from nodemon.its from your windows problem updates windows or reset windows can solves the issues. |
worked out for me! thanks @khayrulamth |
You need to press clt+c and then npm start again if this happen. |
(node:20336) UnhandledPromiseRejectionWarning: Error: Command failed: wmic process where (ParentProcessId=10200) get ProcessId 2> nul |
Guys i followed everything that has been said but still getting that error when nodemon tries rerunning my server |
but when i downgrade nodemon to 2.0.7 from 2.0.12 it works. Why does this happen? because going forward when working on another project nodemon will install the latest version and this means the same error may come up |
Node v14.15.4 I was hoping making changes to my index.js would be picked up by Nodemon and propagated to my webpage but I cannot get the page to update to reflect the changes to my JS file. I make a change to my index.js, Nodemon running in my Git Bash console picks it up: When I had Nodemon v2.0.12 I was getting the following error:
But then I downgraded Nodemon and the error disappeared but webpage still does not reflect changes when I refresh:
|
The solution for this problem is the use of HotLoader. You need to configure Hotloader in your webpack. |
I've no experience of Hotloader or webpack or even how your answer is related to Nodemon and the problems I'm having. I'm sure others on there don't use Hotloader or webpack and managed to get Nodemon to work. Not that it's even a Nodemon issue anyway. |
I still get the same error after doing everything said above... |
I believe I've tried everything to try and get Nodemon working on my W10 system but so far have failed. I've switched to Supervisor and it works a treat for me. But I'd like to get Nodemon working so will be keeping an eye on developments. |
I also had same issue. I have changed nodemon version from 2.0.14-alpha.1 to 2.0.15 and it fixed. But I don't know how. |
nodemon -2.0.9
:node -12.16.3
:"server": "cross-env NODE_ENV=development nodemon index.js",
this script.Expected behaviour
I expect nodemon to restart and track my changes.
Actual behaviour
nodemon throws an unhandled promise rejection warning on save.
I updated to 2.0.9 because of the closing response on issue #1854
Now nodemon still fails to restart, but it does so with this new unhandled promise rejection.
I tried a few different methods of updating nodemon like
npm install nodemon@latest
andnpm update nodemon
. And also tried uninstalling it completely both locally and globally. Then reinstallingI will also make a note that the unhandled promise rejection occurs on nodemon versions 2.0.8-alpha.a and up.
When I downgrade to 2.0.7 it silently fails to restart still.
Steps to reproduce
I'm on windows 10,
My package.json looks like this
results from --dump
The text was updated successfully, but these errors were encountered: