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

only restart once #951

Closed
myfreax opened this issue Dec 11, 2016 · 5 comments
Closed

only restart once #951

myfreax opened this issue Dec 11, 2016 · 5 comments
Labels
stale no activity for 2 weeks

Comments

@myfreax
Copy link

myfreax commented Dec 11, 2016

nodemon --harmony -w app.js app.js

[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: app.js
[nodemon] starting `node --harmony --harmony app.js`
open http://127.0.0.1:3000
[nodemon] restarting due to changes...
[nodemon] starting `node --harmony --harmony app.js`
open http://127.0.0.1:3000

@mikehenrty
Copy link

mikehenrty commented Feb 2, 2017

Hi @huangyanxiong01, I'm having the same problem as you: when you watch a specific file, nodemon will only restart the app after the first file change. All changes made to the file after that don't trigger a restart.

I believe the problem is actually this bug with the chokidar package:
paulmillr/chokidar#237

(I assume from your avatar that you are using linux, which appears to be where this bug occurs). The workaround from that bug would be to run your app like this nodemon --harmony -w '[a]pp.js' app.js. Not ideal I know, but I'm not sure if we will get a fix chokidar any time soon.

Also could you change the name of this bug to Watching file only restarts server after first change on Linux or something more descriptive? Right now it's not clear what bug you are reporting.

@stale
Copy link

stale bot commented Dec 5, 2017

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@stale stale bot added the stale no activity for 2 weeks label Dec 5, 2017
@stale stale bot closed this as completed Dec 12, 2017
kevhender added a commit to storefront-foundation/react-storefront-starter-app that referenced this issue Feb 11, 2020
markbrocato added a commit to storefront-foundation/react-storefront-starter-app that referenced this issue Feb 19, 2020
* Add watcher to restart server when service worker changes

* Update SW watcher to account for weird nodemon bug (remy/nodemon#951)

Co-authored-by: Mark Brocato <mark.brocato@moovweb.com>
markbrocato added a commit to storefront-foundation/react-storefront-starter-app that referenced this issue Feb 19, 2020
* Update example to use proxied next.js

* Updated config

* Updated package version

* Use serverless offline for running prod builds locally

* Update favicon

* Updating react-storefront to avoid fetch failures (#19)

* Add watcher to restart server when service worker changes (#18)

* Add watcher to restart server when service worker changes

* Update SW watcher to account for weird nodemon bug (remy/nodemon#951)

Co-authored-by: Mark Brocato <mark.brocato@moovweb.com>

* add caching

* Revert routes

* some cleanup

Co-authored-by: kaarelkelk <kaarelkelk@gmail.com>
Co-authored-by: Sigurður Gunnar Njálsson <Siggnja@gmail.com>
Co-authored-by: Kevin Henderson <kevhender@gmail.com>
@albertnetymk
Copy link
Contributor

I still experience this problem with nodemon 2.0.2; my current workaround is to use -L. I tried chokidar 3.3.0 directly, it seems to work fine.

@sinbino
Copy link

sinbino commented Jul 21, 2023

I have the exact same problem, also occurs with nodemon 3.0.1 as of July 2023. watch a single file, it only detects the first change.

@remy
Copy link
Owner

remy commented Jul 21, 2023

I have the exact same problem, also occurs with nodemon 3.0.1 as of July 2023. watch a single file, it only detects the first change.

Can you raise a separate issue as what you're reporting is new. Can you also include pared down information on how to replicate.

/cc @sinbino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity for 2 weeks
Projects
None yet
Development

No branches or pull requests

5 participants