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 stuck at restarting #1356

Closed
ghost opened this issue May 30, 2018 · 7 comments
Closed

nodemon stuck at restarting #1356

ghost opened this issue May 30, 2018 · 7 comments
Labels

Comments

@ghost
Copy link

ghost commented May 30, 2018

  • nodemon -v: 1.12.1 and 1.17.5 (I have tried nodemon@latest)
  • node -v: 8.4.0
  • npm -v: 5.0.3
  • Operating system/terminal environment: Windows 10 using Node.js command prompt
  • Command you ran: nodemon

Expected behaviour

When I save my sever.js file, it should console.log('test') again and the port it is listening at.

Actual behaviour

image

Steps to reproduce

Not sure how to reproduce it.

It is the exact same issue as: #813

I know this isn't a lot of information, but I don't know much and I'm hoping by creating this it will highlight if I'm not the only one with this issue. If you need anything else from me, please let me know.

@ghost ghost changed the title Nodemon stuck at restarting nodemon Stuck At Restarting May 30, 2018
@ghost ghost changed the title nodemon Stuck At Restarting nodemon stuck at restarting May 30, 2018
@remy remy added the windows label May 31, 2018
@remy
Copy link
Owner

remy commented May 31, 2018

First question: does it suddenly drop into a restart loop?

If so, can you include the output but run nodemon using the --verbose flag?

@AbdelrahmanHafez
Copy link

AbdelrahmanHafez commented Jun 2, 2018

Hello, @remy I am somewhat active on GitHub, and have been facing the issue for quite a while now.
Let me know how I can help.

Yes, sometimes it suddenly drops into a restart loop, and when I used --verbose before, it restarted on every file being opened by Node require(...) function, I don't even open them in my text editor or anything.

Can't reproduce the bug now, using nodemon with --verbose, will post the results once it happens again.

EDIT:

This is how it looks on the first start:

> set NODE_ENV=DEV&& set DB=LOCAL&& nodemon --inspect server.js --verbose

[nodemon] 1.17.5
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 20948 to restart
[nodemon] watching: *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node --inspect server.js`
[nodemon] spawning
[nodemon] child pid: 18824
Debugger listening on ws://127.0.0.1:9229/2010891c-ec54-4f31-a2cc-b027724ff74e
For help, see: https://nodejs.org/en/docs/inspector
[nodemon] watching 1007 files
(node:21756) ExperimentalWarning: The fs.promises API is experimental
Autotash is running DEV on port 3000 !

And this is how it looks when it keeps restarting (trimmed 700 lines in the middle)

                                                                                                                                                                                                                                           
[nodemon] files triggering change check: modules\users\team\controllers\users.team.controller.js                                                                                                                                           
[nodemon] matched rule: **\*.*                                                                                                                                                                                                             
[nodemon] changes after filters (before/after): 1/1                                                                                                                                                                                        
[nodemon] restarting due to changes...                                                                                                                                                                                                     
[nodemon] Modules\users\team\controllers\users.team.controller.js                                                                                                                                                                          
                                                                                                                                                                                                                                           
[nodemon] files triggering change check: modules\users\team\controllers\authentication\authentication.team.login.controller.js                                                                                                             
[nodemon] matched rule: **\*.*                                                                                                                                                                                                             
[nodemon] changes after filters (before/after): 1/1                                                                                                                                                                                        
[nodemon] restarting due to changes...                                                                                                                                                                                                     
[nodemon] Modules\users\team\controllers\authentication\authentication.team.login.controller.js                                                                                                                                            
                                                                                                                                                                                                                                           
[nodemon] files triggering change check: modules\users\team\controllers\profile\profile.list.customer.team.controller.js                                                                                                                   
[nodemon] matched rule: **\*.*                                                                                                                                                                                                             
[nodemon] changes after filters (before/after): 1/1                                                                                                                                                                                        
[nodemon] restarting due to changes...                                                                                                                                                                                                     
[nodemon] Modules\users\team\controllers\profile\profile.list.customer.team.controller.js                                                                                                                                                  

... trimmed 700 lines here, basically the same thing

[nodemon] files triggering change check: modules\vendors\team\controllers\managers\vendors.managers.unassign.team.controller.js                                                                                                            
[nodemon] matched rule: **\*.*                                                                                                                                                                                                             
[nodemon] changes after filters (before/after): 1/1                                                                                                                                                                                        
[nodemon] restarting due to changes...                                                                                                                                                                                                     
[nodemon] Modules\vendors\team\controllers\managers\vendors.managers.unassign.team.controller.js                                                                                                                                           
                                                                                                                                                                                                                                           
[nodemon] starting `node --inspect server.js`                                                                                                                                                                                              
[nodemon] spawning                                                                                                                                                                                                                         
[nodemon] child pid: 16904                                                                                                                                                                                                                 
Debugger listening on ws://127.0.0.1:9229/7aeb20b1-2e44-4b78-b400-1179cd9c396f                                                                                                                                                             
For help, see: https://nodejs.org/en/docs/inspector                                                                                                                                                                                        
(node:12296) ExperimentalWarning: The fs.promises API is experimental                                                                                                                                                                      
Autotash is running DEV on port 3000 !                                                                                                                                                                                                     
                                                                                                                                                                                                                                           

@balciseri
Copy link

as #1354 (comment)
try to run fsutil behavior set disablelastaccess 1 from an elevated shell.

did it fix it?

@AbdelrahmanHafez
Copy link

AbdelrahmanHafez commented Jun 3, 2018

Gave it a try, as an initial result, the bug was fixed.

I'll post here if the issue happens again.

EDIT :
3 days after, the bug hasn't still come back. #1354 (comment) probably solves it!

@ghost
Copy link
Author

ghost commented Jun 28, 2018

Hi all, it's been a long time but I found a solution to my problem at last.

If I run nodemon locally, it works fine, it only does this when I run it globally.

I've tried uninstalling and reinstalling globally, but no luck. No idea why this is the case, but we can close now.

@ghost ghost closed this as completed Jun 28, 2018
@akuppili45
Copy link

akuppili45 commented Jul 5, 2018

@TFKED how did you install nodemon locally? I used npm install nodemon without the g, but when I tried to run it, my terminal said that it doesn't recognize nodemon as a command.

@ghost
Copy link
Author

ghost commented Jul 24, 2018

@AwesomeBanana123 it won't. You have to run it like this if running locally: ./node_modules/.bin/nodemon --watch server.js

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

No branches or pull requests

4 participants