René's URL Explorer Experiment


Title: --watch should monitor replaced files · Issue #51621 · nodejs/node · GitHub

Open Graph Title: --watch should monitor replaced files · Issue #51621 · nodejs/node

X Title: --watch should monitor replaced files · Issue #51621 · nodejs/node

Description: What is the problem this feature will solve? Currently, --watch watches an inode and not necessarily what the user might consider a "file". This can cause confusion on systems that write to disk by deleting the old file and then creating...

Open Graph Description: What is the problem this feature will solve? Currently, --watch watches an inode and not necessarily what the user might consider a "file". This can cause confusion on systems that write to disk by...

X Description: What is the problem this feature will solve? Currently, --watch watches an inode and not necessarily what the user might consider a "file". This can cause confusion on systems that write ...

Opengraph URL: https://github.com/nodejs/node/issues/51621

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"--watch should monitor replaced files","articleBody":"### What is the problem this feature will solve?\r\n\r\nCurrently, `--watch` watches an [inode](https://nodejs.org/docs/latest/api/fs.html#inodes) and not necessarily what the user might consider a \"file\". This can cause confusion on systems that write to disk by deleting the old file and then creating a new one.\r\n\r\nFor example, when using Docker Compose's [`watch`](https://docs.docker.com/compose/file-watch/) mode, the watched file is first deleted.  When a new file is created Node currently fails to restart on file changes, as  node is still watching the inode of the deleted file, and doesn't react to the new file being created.\r\n\r\n### What is the feature you are proposing to solve the problem?\r\n\r\nWhile this behavior makes sense for the lower-level and more \"raw\" `fs.watch()`, perhaps the more general `--watch` behavior can be expanded to be smarter about detecting replaced files. Alternatively, a new flag can be introduced with this behavior.\r\n\r\n### What alternatives have you considered?\r\n\r\nOther alternatives require using one of the different file watcher libs. That seems like a step down from the otherwise awesome native `watch` feature.\r\n\r\n\r\nDocker Compose Issue: [[BUG] Compose Watch With “node –watch” Only Reloads First Time](https://github.com/docker/compose/issues/11090)\r\nDocker Issue: [node --watch doesn't work well within a container](https://github.com/moby/moby/issues/47061)","author":{"url":"https://github.com/mbrevda","@type":"Person","name":"mbrevda"},"datePublished":"2024-01-31T17:07:56Z","url":"https://github.com/nodejs/node/issues/51621"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ceb47b8c-50ea-52cf-812b-d0bacb16558d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id892E:2F339D:7730BF:9ED338:6AED24A6
html-safe-nonce62520b4214a6511b3490be89aabf2c5f63812e1044aaf0fd474709fccfcdd93e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTJFOjJGMzM5RDo3NzMwQkY6OUVEMzM4OjZBRUQyNEE2IiwidmlzaXRvcl9pZCI6IjM2NTM4MzA4MjM0MTMzNTk3ODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0dc892dc8fd31b55589031b50c1cbc471f0947c77ceda5458bb1795e69b80583
hovercard-subject-tagissue:2110574191
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/51621/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dfe21e7caefec892d60e98de7e2da21d9099f05602ecabc182a55df4b68fcd27/nodejs/node/issues/51621
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dfe21e7caefec892d60e98de7e2da21d9099f05602ecabc182a55df4b68fcd27/nodejs/node/issues/51621
og:image:altWhat is the problem this feature will solve? Currently, --watch watches an inode and not necessarily what the user might consider a "file". This can cause confusion on systems that write to disk by...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamembrevda
hostnamegithub.com
expected-hostnamegithub.com
Nonee3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release707a24b346ac8a82878b9c084efaa38a997660cb
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/51621#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F51621
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F51621
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/51621
Reloadhttps://github.com/nodejs/node/issues/51621
Reloadhttps://github.com/nodejs/node/issues/51621
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues657 (657)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/51621
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/51621
#63888https://github.com/nodejs/node/pull/63888
--watch should monitor replaced fileshttps://github.com/nodejs/node/issues/51621#top
#63888https://github.com/nodejs/node/pull/63888
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
watch-modeIssues and PRs related to watch mode.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22watch-mode%22
https://github.com/mbrevda
mbrevdahttps://github.com/mbrevda
on Jan 31, 2024https://github.com/nodejs/node/issues/51621#issue-2110574191
inodehttps://nodejs.org/docs/latest/api/fs.html#inodes
watchhttps://docs.docker.com/compose/file-watch/
[BUG] Compose Watch With “node –watch” Only Reloads First Timehttps://github.com/docker/compose/issues/11090
node --watch doesn't work well within a containerhttps://github.com/moby/moby/issues/47061
Nexthttps://github.com/nodejs/node/issues/51621?timeline_page=1
mbrevdahttps://github.com/mbrevda
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
on Jan 31, 2024https://github.com/nodejs/node/issues/51621#event-11658880478
github-project-automationhttps://github.com/apps/github-project-automation
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Jan 31, 2024https://github.com/nodejs/node/issues/51621#event-14894595399
github-project-automationhttps://github.com/apps/github-project-automation
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Jan 31, 2024https://github.com/nodejs/node/issues/51621
debadree25https://github.com/debadree25
watch-modeIssues and PRs related to watch mode.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22watch-mode%22
on Feb 1, 2024https://github.com/nodejs/node/issues/51621#event-11673431816
https://github.com/benjamingr
benjamingrhttps://github.com/benjamingr
on Feb 2, 2024https://github.com/nodejs/node/issues/51621#issuecomment-1923757846
@MoLowhttps://github.com/MoLow
https://github.com/MoLow
MoLowhttps://github.com/MoLow
on Feb 4, 2024https://github.com/nodejs/node/issues/51621#issuecomment-1925696523
https://github.com/debadree25
debadree25https://github.com/debadree25
on Feb 5, 2024https://github.com/nodejs/node/issues/51621#issuecomment-1927559987
https://github.com/mstaicu
mstaicuhttps://github.com/mstaicu
on Jul 23, 2024https://github.com/nodejs/node/issues/51621#issuecomment-2246055264
mstaicuhttps://github.com/mstaicu
on Jul 23, 2024https://github.com/nodejs/node/issues/51621#event-13620359422
add nodemon back until node --watch is fixed nodejs/node#51621https://github.com/mstaicu/aperitif/commit/6f3cc44efafae65bb810b609244797dd8cfcecc5
nodejs/node#51621https://github.com/nodejs/node/issues/51621
6f3cc44https://github.com/mstaicu/aperitif/commit/6f3cc44efafae65bb810b609244797dd8cfcecc5
https://github.com/ruscon
rusconhttps://github.com/ruscon
on Aug 13, 2024https://github.com/nodejs/node/issues/51621#issuecomment-2286603572
https://github.com/RaiPeter
RaiPeterhttps://github.com/RaiPeter
on Feb 7, 2025https://github.com/nodejs/node/issues/51621#issuecomment-2642122449
@rusconhttps://github.com/ruscon
klondikemarlenhttps://github.com/klondikemarlen
on Apr 23, 2025https://github.com/nodejs/node/issues/51621#event-17379130960
🐛 Switch back to using volume mount for test_api container.https://github.com/icefoganalytics/traditional-knowledge/commit/635e3499fd05c4cd0ada5d5eda9c0a9934052f76
635e349https://github.com/icefoganalytics/traditional-knowledge/commit/635e3499fd05c4cd0ada5d5eda9c0a9934052f76
https://github.com/Yovach
Yovachhttps://github.com/Yovach
on Aug 2, 2025https://github.com/nodejs/node/issues/51621#issuecomment-3146422968
https://github.com/Yovach/compose-watch-js-runtimeshttps://github.com/Yovach/compose-watch-js-runtimes
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jan 30, 2026https://github.com/nodejs/node/issues/51621#issuecomment-3821286031
GitHub Actionshttps://help.github.com/en/actions
never-stalehttps://github.com/nodejs/node/labels/never-stale
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 30, 2026https://github.com/nodejs/node/issues/51621#event-22392868662
jonatansberghttps://github.com/jonatansberg
on Feb 25, 2026https://github.com/nodejs/node/issues/51621#event-23062137946
Swapped Ghost core use of node --watch to nodemon for Docker hot reloadhttps://github.com/TryGhost/Ghost/commit/a369e36092356548d7d1e61b7583f83ced096d0b
a369e36https://github.com/TryGhost/Ghost/commit/a369e36092356548d7d1e61b7583f83ced096d0b
Swapped Ghost core use of node --watch to nodemon for Docker hot relo…https://github.com/TryGhost/Ghost/commit/fff5e13bd5a5e29c97b644e49d75781fae930620
fff5e13https://github.com/TryGhost/Ghost/commit/fff5e13bd5a5e29c97b644e49d75781fae930620
https://github.com/marcopiraccini
marcopiraccinihttps://github.com/marcopiraccini
on Jun 13, 2026https://github.com/nodejs/node/issues/51621#issuecomment-4698307168
#63888https://github.com/nodejs/node/pull/63888
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 12, 2026https://github.com/nodejs/node/issues/51621#issuecomment-5642508867
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Sep 12, 2026https://github.com/nodejs/node/issues/51621#event-31007146899
https://github.com/chbybnwr
chbybnwrhttps://github.com/chbybnwr
on Sep 12, 2026https://github.com/nodejs/node/issues/51621#issuecomment-5644334205
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Sep 13, 2026https://github.com/nodejs/node/issues/51621#event-31039147370
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#63888https://github.com/nodejs/node/pull/63888
on Sep 27, 2026https://github.com/nodejs/node/issues/51621#event-31925626189
nodejs-github-bothttps://github.com/nodejs-github-bot
on Sep 27, 2026https://github.com/nodejs/node/issues/51621#event-31925626251
watch: detect files replaced via unlink and createhttps://github.com/nodejs/node/commit/3641c36af1e99d47d0b90a9e86143153efdc54a8
3641c36https://github.com/nodejs/node/commit/3641c36af1e99d47d0b90a9e86143153efdc54a8
https://github.com/mstaicu
mstaicuhttps://github.com/mstaicu
on Sep 27, 2026https://github.com/nodejs/node/issues/51621#issuecomment-5854847390
aduh95https://github.com/aduh95
on Sep 27, 2026https://github.com/nodejs/node/issues/51621#event-31936998238
watch: detect files replaced via unlink and createhttps://github.com/nodejs/node/commit/8a42aa83f6839f33460e1813bb43cf5ca945c25b
8a42aa8https://github.com/nodejs/node/commit/8a42aa83f6839f33460e1813bb43cf5ca945c25b
HoonDongKanghttps://github.com/HoonDongKang
on Sep 28, 2026https://github.com/nodejs/node/issues/51621#event-31971111285
watch: detect files replaced via unlink and createhttps://github.com/HoonDongKang/node/commit/3fa8c4c2c68591e6605a64507809dba3645ca11a
3fa8c4chttps://github.com/HoonDongKang/node/commit/3fa8c4c2c68591e6605a64507809dba3645ca11a
aduh95https://github.com/aduh95
on Sep 28, 2026https://github.com/nodejs/node/issues/51621#event-32031894028
watch: detect files replaced via unlink and createhttps://github.com/nodejs/node/commit/17964bb6994767770c4ba4f275dc49c3d28c18fd
17964bbhttps://github.com/nodejs/node/commit/17964bb6994767770c4ba4f275dc49c3d28c18fd
aduh95https://github.com/aduh95
on Oct 23, 2026https://github.com/nodejs/node/issues/51621#event-34094390163
watch: detect files replaced via unlink and createhttps://github.com/nodejs/node/commit/3e1ced38f94f828a0dcdfb08ddd573e1d663ba81
3e1ced3https://github.com/nodejs/node/commit/3e1ced38f94f828a0dcdfb08ddd573e1d663ba81
watch: detect files replaced via unlink and createhttps://github.com/nodejs/node/commit/c3463de375bccb80952865fa992561b8da3c92d8
c3463dehttps://github.com/nodejs/node/commit/c3463de375bccb80952865fa992561b8da3c92d8
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/51621
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/51621
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
watch-modeIssues and PRs related to watch mode.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22watch-mode%22
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.