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

Nodemon not completing restart of server on change of server side code #1630

Closed
hphvac opened this issue Nov 19, 2019 · 70 comments
Closed

Nodemon not completing restart of server on change of server side code #1630

hphvac opened this issue Nov 19, 2019 · 70 comments
Labels
needs latest nodemon stale no activity for 2 weeks

Comments

@hphvac
Copy link

hphvac commented Nov 19, 2019

  • nodemon -v:
  • node -v:
  • Operating system/terminal environment:
    node js
  • Using Docker? What image:
  • Command you ran:
    npm run dev-starts fine-update to code does not

Expected behaviour

Restart of server on server side code change

Actual behaviour

freezes and just repeats restarting due to changes-doesnt actually restart

Steps to reproduce

any change to code-
have updated all dependencies


If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.

@remy
Copy link
Owner

remy commented Nov 19, 2019

Hi there, to be able to debug this issue, you're really going to need to provide more information about what you're doing, what OS you're running - and really all the questions you ignored - otherwise this issue will self close because no one will be able to help you :(

@remy remy added the needs more info not enough information in issue to debug label Nov 19, 2019
@hphvac
Copy link
Author

hphvac commented Nov 19, 2019

node v-10.15.3
nodemon v-1.19.4
Win 10 running win 32 bit
no docker
Node js is server lang
command i use to start server is npm run dev
reproduces whenever it is supposed to restart

@hphvac
Copy link
Author

hphvac commented Nov 19, 2019

missed those sorry

@hphvac
Copy link
Author

hphvac commented Nov 19, 2019

just saw-Visual Studio Code-Version 1.40 October 2019 release

@remy
Copy link
Owner

remy commented Nov 20, 2019

Possible the PR #1579 will fix - please re-test when it's live.

@remy remy added the has PR label Nov 20, 2019
@hphvac
Copy link
Author

hphvac commented Nov 20, 2019

im not sure what that means

@joseph-galindo
Copy link

@hphvac #1579 was shipped in nodemon@2.0.0 - try that version to see if your issue has been fixed

@hphvac
Copy link
Author

hphvac commented Nov 21, 2019

@joseph-galindo -i am sorry, but it did not.

@remy
Copy link
Owner

remy commented Nov 21, 2019

@hphvac you're going to need to provide more feedback. Can you start with a screenshot of the output that you're seeing?

@remy remy removed the has PR label Nov 21, 2019
@Remzi1993
Copy link

Hi @joseph-galindo

You could update your NPM packages by using the @latest tag, see example here under:

npm install -g nodemon@latest

Or

npm install --save-dev nodemon@latest

https://bytearcher.com/articles/using-npm-update-and-npm-outdated-to-update-dependencies/
https://flaviocopes.com/update-npm-dependencies/

@hphvac
Copy link
Author

hphvac commented Nov 21, 2019

here you go, thank you for your time

nodemonnoworky

@hphvac
Copy link
Author

hphvac commented Nov 21, 2019

@remy @joseph-galindo Thank you

@remy
Copy link
Owner

remy commented Nov 22, 2019

@hphvac can you re-run with the -V flag so we can see what's causing the restart (in the screenshot)?

@hphvac
Copy link
Author

hphvac commented Nov 22, 2019

@remy I really appreciate the help, but i do not know what you mean by that. What restarts it is the normal action of editing server side code, as it should. but it seems as though it never restarts.
a normal restart looks like this
nodemonnowork2
, however whenever i change code, it just hangs here.
nodemonnowork23

@hphvac
Copy link
Author

hphvac commented Nov 22, 2019

if you have a reference to refer me to i could learn, but all i know about v flag is version...lol

@Remzi1993
Copy link

@hphvac I think he wants you to run it like this:
npm run dev -V

Could you try this?

@hphvac
Copy link
Author

hphvac commented Nov 22, 2019

@Remzi1993 I did try that, there is no change

@Remzi1993
Copy link

Remzi1993 commented Nov 22, 2019

Did you also try:
npm run -V dev
Or
npm -V run dev
Also it's capital, npm -v is displaying npm version and this is capital -V
npm <command> --key value and sometimes short variant -tag

EDIT: Oops, he meant run it like this: nodemon -V
If you do nodemon -h you will get a list what you could do with nodemon.

@remy
Copy link
Owner

remy commented Nov 22, 2019

@hphvac just to clarify, can you run the nodemon -V command directly instead of npm run dev (on a unix based system I can tell you how to pass arguments through to nodemon, but I'm not familiar with Windows command line capabilities).

Then, just as you have before, screenshot the output that shows nodemon restarting (the -V flag will tell nodemon to print the files triggering the restart).

@remy
Copy link
Owner

remy commented Nov 22, 2019

@Remzi1993 the syntax to send arguments from the command line to the script npm is npm run dev -- -V - the double dash is what tells the command line to stop slurping arguments. But I'm not sure it works on Windows.

@hphvac
Copy link
Author

hphvac commented Nov 22, 2019 via email

@remy
Copy link
Owner

remy commented Nov 22, 2019

@hphvac you need a space between nodemon and the - and it needs to be a capital V (not lower - a lowercase v will print the version).

@hphvac
Copy link
Author

hphvac commented Nov 22, 2019

@remy Nice!-Here you go,Thanks!
nodemonnoworky2331
I also tried adding a delay, no avail.
nodemonnoworky23312

@hphvac
Copy link
Author

hphvac commented Nov 22, 2019

@remy @ just got this!
nodemonnoworky233121
nodemonnoworky4

@hphvac
Copy link
Author

hphvac commented Nov 25, 2019

@remy @Remzi1993 Good morning-i have found that on node error, the app also restarts correctly- seems only to happen on restart as a result of code change- I have also found that it seems as though the server is actually running. Even though it says it is restarting. Basically on a client side request, the server responds-however it is still running the previous processes-in other words-it is still running the unchanged code-

@Remzi1993
Copy link

Remzi1993 commented Nov 26, 2019

@remy This looks looks like a serious issue. Is this related to #1632 or #1635 ?
Seems like something broke it.

PS: It could also be a naming issue, because everything should be subprocesses right?
In the log I see something about a child.__nodemonRestart?

@remy
Copy link
Owner

remy commented Nov 26, 2019

Yes, that's right, but I don't know how child is null/undefined at this point. Possibly makes sense to protect against assigning the prop, but until I can get my hands on Windows to test properly I can't say. I'll try to scrape some time this week with a VM to replicate and debug.

@JonatanOrtiz
Copy link

Same problem. I tried all the tips and they didn't solve the problem.

@Habeebullahi01
Copy link

I'm running the latest version of nodemon and I still have this problem.

@Silventino
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

@Remzi1993
Copy link

@remy Seems like folks still have issues with this. Could you kindly re-open this issue?

@remy
Copy link
Owner

remy commented Jul 25, 2020

Best to file a new case with code on how to replicate.

@isaacgr
Copy link

isaacgr commented Aug 16, 2020

Found this post which suggested using nodemon app.js -L to set the legacy flag and enable polling. This worked for me on Windows 10. Not sure why its broken though.

@sunny775
Copy link

sunny775 commented Oct 2, 2020

If you're running on windows, make sure system32 folder is in the path variables.

@Silventino you're a f**king genius! This worked for me. Thanks so much

@leleoveiga
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

@Silventino geniussssssssssssss, it worked for me too. Thanks so much!

@nilesh-yadav-au6
Copy link

@Silventino thanks boss....... worked for me to

@Marwan1998
Copy link

@Silventino That Worked for me either, i really want to kiss you 😂, Thanks Alooooooot ❤️

@woojerry
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

WOW ~! I tried this problem for 3days and I finally solved it by this. Thank you very much !!!!!!!!!!!!!!!!!!!!!!!!!

@MehedilslamRipon
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

what is the path variable? I can't understand. please help...

@Silventino
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

what is the path variable? I can't understand. please help...

https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/
follow this tutorial and add "C:\Windows\System32" to the PATH

@Ryzen-thor
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

Thanks It worked

@bhavyajain6
Copy link

If you're running on windows, make sure system32 folder is in the path variables.

amazing man it workeeedddd. All the big solutions failed it was just this little thing. Thanks a ton man

@ranger-code
Copy link

Just Downgrade nodemon version to 2.0.2

@peter571
Copy link

Neither of the above is solving my issue
image

@hphvac
Copy link
Author

hphvac commented Jul 21, 2021 via email

@ranger-code
Copy link

Just Downgrade nodemon version to 2.0.2

it worked for me

@HADMARINE
Copy link

HADMARINE commented Jul 26, 2021

Just Downgrade nodemon version to 2.0.2

It worked for me (2)
Downgraded from 2.0.12 to 2.0.2

@RaresTarniceru
Copy link

Yep. Downgrade to v 2.0.2, was the only thing for me too. Just write the command npm i nodemon@2.0.2

@GusGF
Copy link

GusGF commented Sep 13, 2021

Even downgrading to v2.0.2 doesn't work. Yep an error isn't generated but I believe now that nodemon isn't working for me. But since so many are having problems with the latest version why has this thread remained closed?

@mdodge-ecgrow
Copy link

Having same issue, Nodemon does not appear to be actually restarting Node after a change. I've verified System32 is in my path. I am on version 2.0.2.

Repository owner deleted a comment from dassoumyamoy00 Sep 22, 2021
@ghost
Copy link

ghost commented Oct 3, 2021

Just Downgrade nodemon version to 2.0.2

Worked for me. Tks man

@HADMARINE
Copy link

Even downgrading to v2.0.2 doesn't work. Yep an error isn't generated but I believe now that nodemon isn't working for me. But since so many are having problems with the latest version why has this thread remained closed?

I agree with this thread, it should be open

@remy
Copy link
Owner

remy commented Oct 3, 2021

Latest version != this original issue. Track the new issues on the current open issues - they also include some actual information.

Repository owner locked and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs latest nodemon stale no activity for 2 weeks
Projects
None yet
Development

No branches or pull requests