-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Infinite loop when starting nodemon #505
Comments
@Impozible please read up on Fenced code blocks so that we can easier read your output. You'll want to edit your post with the output wrapped like this: (' should be `)
|
Ok, I just edited my message. Thank you for your fast answer. |
I'm experiencing this issue as well. Any ideas on why this is happening? |
Can anyone else confirm this issue is happening on node 0.13? Or can you replicate on node stable too? |
Ping @hai-cea - can you confirm the version of node you're running with? |
Hi @remy - I'm using NVM - node v0.12.0 |
Nodemon CPU usage goes through the roof whenever the I'm using Node v0.12.2 on Windows 7 64 bit. |
Having the same issue with node 0.12.3. Let me know if you'd like any more information; I'm very motivated to get this issue figured out. |
I can't replicate this at all, so someone else will need to debug and send
|
I have the same problem, using express/mongo as well. Not sure if this is relevant, but I'll add it here : I'm in a vagrant virtual machine with nfs synchronisation of the filesystem. Usually just stopping |
I'm seeing the problem as well and I'm also using vagrant with nfs |
@remy How do I load this test version? |
Its at the top of this issue, in bold... npm install -g nodemon@dev On Sat, 5 Sep 2015 10:03 Douglas Ferguson [email protected] wrote:
|
Thanks, Does the nodemon@dev trick work if I'm using package.json? On Sat, Sep 5, 2015 at 11:50 AM, Remy Sharp [email protected]
|
I think so, I assume you mean as a local dependency. On Sat, 5 Sep 2015 18:01 Douglas Ferguson [email protected] wrote:
|
Yeah.. Do I just add the following to my package json? nodemon: 'dev" Also, I'm using grunt-nodemon, will it actually use this version or it's On Sat, Sep 5, 2015 at 1:10 PM, Remy Sharp [email protected] wrote:
|
I don't know about how other packages work. I'm not sure grunt-nodemon uses When I use nodemon as a direct dependency I'd install as simply On Sat, 5 Sep 2015 19:19 Douglas Ferguson [email protected] wrote:
|
#625 closes and released in |
getting this in 2017, I have used nodemon a couple times before, not a newb with this, cannot figure out why it keeps restarting! will report back if I figure it out. |
@ORESoftware I've been experiencing this for over a week now. And I don't seem to understand anymore either. I containerized my application and still the same thing. |
Worth opening a new issue and including the nodemon version, node version, npm or yarn (doubt if it makes a difference), and OS. |
I love Nodemon, the functionality it provides is critical to fast development. https://medium.com/@the1mills/diy-nodemon-5176fdcc1cfb#.t650qxq40 it was less time to write the script than to debug nodemon as is. I don't intend to undermine Nodemon, I simply intend to help people who might be in a bind like I was, I could not figure out why it keeps restarting. So bizarre. |
You might be amazed at how simple (and short) the first version of nodemon
was. Scope creep eh? 🤔
…On Sat, 25 Feb 2017, 00:23 Operations Research Engineering Software+, < ***@***.***> wrote:
I love Nodemon, the functionality it provides is critical to fast
development.
I will come back to Nodemon, but if you need a script that does the job,
you can use this
***@***.***/diy-nodemon-5176fdcc1cfb#.t650qxq40
it was less time to write the script than to debug nodemon as is. I don't
intend to undermine Nodemon, I simply intend to help people who might be in
a bind like I was, I could not figure out why it keeps restarting. So
bizarre.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#505 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAA1hDV2u9ClzG2BUHVGbZgXHxOeSO88ks5rf3SNgaJpZM4DgElF>
.
|
I believe that! I saw hundreds of commits and 10s of branches and I was too afraid to look at the code as is. Now that I have tried my hand at I will take a look and the feature creep that took place! One thing I definitely found that I wanted - as a user I would like to tell Nodemon whether I want Nodemon to send SIGTERM, SIGINT or SIGKILL to my process. |
There's a PR in progress that lands that change. I think it's a little way
off though (it's mostly a clean up by a contributor).
…On Sat, 25 Feb 2017, 18:47 Alexander Mills, ***@***.***> wrote:
I believe that! I saw hundreds of commits and 10s of branches and I was
too afraid to look at the code as is. Now that I have tried my hand at I
will take a look and the feature creep that took place!
One thing I definitely found that I wanted - as a user I would like to
tell Nodemon whether I want Nodemon to send SIGTERM, SIGINT or SIGKILL to
my process.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#505 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAA1hA30jYribc26O16bjIVFCUfX_0xBks5rgHdUgaJpZM4DgElF>
.
|
@ORESoftware in my case, I noticed it's tracking my .tmp/ directory and |
@tonespy that worked for me as well |
still getting this. some info about my config: OSX my package json:
the command I run:
It just keeps saying "restarting due to file changes" and then crashes. some of the versions: Don't have time to pursue it further at the moment, doing the manual compile & run method for now. The key why it goes in to forever loop is because of the tsc task runner, I have no idea what's going on. They are feeding off each other somehow. |
This seems to be happening on the latest version of Nodemon. I backed up to |
I get this infinite loop if nodemon is run with |
Yeah I would avoid using |
I encountered the same issue. This bug is not related to By using the verbose mode in my I hope this explanation should help others with this issue. |
@Airboy not following. What do you mean by "verbose mode"? |
And what's the correct way to fix this problem? |
You merely have to add the following option In this mode, nodemon should display the file causing its restart. I don't guarantee that you can quickly solve your problem, but it's a good start to find the cause of this issue. In my case, I found that the
|
A fairly common example of nodemon looping restarts is when the application creates a file during start-up that's caught be nodemon watch filters, which triggers a restart, and then the entire process goes into a loop. Run |
@remy yes, I've seen those problems happen before, and didn't equate the two. That was probably what was happening all along. False positive. Thanks. |
Nope. I take it back. I ran verbose and files that are in Am I doing the pattern wrong?
|
@arxpoetica I think that's an absolute path, so assuming that |
I found the problem. It's reading
Why would it do that if I have a nodemonignore file already? |
I mean, I can just switch to the modern convention, which is what I'll do. (Tho' I prefer the old way.) |
Oh yes, if there's |
Wait…sorry, I spoke too early. That log just means it's checking. I'm just checking the source code now… |
To be clear, I don't have |
I'm reading the code (and will open a new issue) because the logging around where the config came from isn't clear (at all!). Can you run your nodemon command (as you are already) but with |
Yup. Probably good to still open an issue, though I just got it working correctly! |
That wasn't the |
Yeah, sorry, I figured that out right after I posted (and promptly deleted). Here's the actual dump: [nodemon] 1.14.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
--------------
node: v9.2.0
nodemon: 1.14.7
command: /Users/americanyak/.nvm/versions/node/v9.2.0/bin/node /Users/[...path ommitted...]/project-y/node_modules/.bin/nodemon --dump -r @std/esm server.js
cwd: /Users/[...path ommitted...]/project-y
OS: darwin x64
--------------
{ run: false,
system:
{ cwd: '/Users/[...path ommitted...]/project-y' },
required: false,
dirs:
[ '/Users/[...path ommitted...]/project-y' ],
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: /.*\..*/ ],
ignoreRoot:
[ '**/.git',
'**/.nyc_output',
'**/.sass-cache',
'**/bower_components',
'**/coverage',
'**/node_modules' ],
restartable: 'rs',
colours: true,
execMap: { py: 'python', rb: 'ruby' },
stdin: true,
runOnChangeOnly: false,
verbose: false,
signal: 'SIGUSR2',
stdout: true,
watchOptions: {},
execOptions:
{ script: 'server.js',
exec: 'node',
args: [ '-r', '@std/esm' ],
scriptPosition: 2,
nodeArgs: undefined,
execArgs: [],
ext: 'js,mjs,json',
env: {} },
monitor:
[ '*.*',
'!**/.git',
'!**/.nyc_output',
'!**/.sass-cache',
'!**/bower_components',
'!**/coverage',
'!**/node_modules' ] },
load: [Function],
reset: [Function: reset],
lastStarted: 0,
loaded:
[ '/Users/[...path ommitted...]/project-y/package.json' ],
watchInterval: null,
signal: 'SIGUSR2',
command:
{ raw: { executable: 'node', args: [ '-r', '@std/esm', 'server.js' ] },
string: 'node -r @std/esm server.js' } }
-------------- |
My two bits... Try updating nodemon. |
My solution: add nodemonConfig in package.json file in order to stop infinite loop. In package.json: |
Hi everyone.
I'm trying to create a simple REST api with Node, Express, Swig and MongoDB, but when I try to start my app, it runs in an infinte loop tha goes like this:
And so on. Do you know what could be happening?
Here is my nodemon --dump
Thank you so much in advance.
The text was updated successfully, but these errors were encountered: