Title: Multiple --env-file no longer work with --watch · Issue #60599 · nodejs/node · GitHub
Open Graph Title: Multiple --env-file no longer work with --watch · Issue #60599 · nodejs/node
X Title: Multiple --env-file no longer work with --watch · Issue #60599 · nodejs/node
Description: Version v25.1.0 Platform Microsoft Windows NT 10.0.26200.0 x64 Subsystem No response What steps will reproduce the bug? Create .a.env, and .b.env. .a.env includes: "ENV_VAR_A=123". .b.env includes: "ENV_VAR_B=456". create index.js that d...
Open Graph Description: Version v25.1.0 Platform Microsoft Windows NT 10.0.26200.0 x64 Subsystem No response What steps will reproduce the bug? Create .a.env, and .b.env. .a.env includes: "ENV_VAR_A=123". .b.env includes:...
X Description: Version v25.1.0 Platform Microsoft Windows NT 10.0.26200.0 x64 Subsystem No response What steps will reproduce the bug? Create .a.env, and .b.env. .a.env includes: "ENV_VAR_A=123". .b.env...
Opengraph URL: https://github.com/nodejs/node/issues/60599
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Multiple --env-file no longer work with --watch","articleBody":"### Version\n\nv25.1.0\n\n### Platform\n\n```text\nMicrosoft Windows NT 10.0.26200.0 x64\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\n1. Create .a.env, and .b.env.\n2. .a.env includes: \"ENV_VAR_A=123\".\n3. .b.env includes: \"ENV_VAR_B=456\".\n4. create index.js that does this:\n```\nconsole.log(process.env.ENV_VAR_A)\n```\n5. Run \"node --env-file=.a.env --env-file=.b.env --watch index.js\".\n6. Result output \"undefined\" (instead of 123)\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nExpected to see \"123\", because both .env files should be included and loaded as the command says. Notice that the env vars in those 2 files are different, so those 2 files should be \"merged\" as result, instead of be completely overwritten by the last one.\n\n### What do you see instead?\n\nIt always output \"undefined\" when \"--watch\" is added. It does output \"123\" when \"--watch\" is removed.\n\n### Additional information\n\nUntil Node.js v24.4, the multiple --env-file works well with --watch. I updated to v25.1.0 yesterday, and this pattern no longer works. As I've mentioned above, highly likely this is caused by \"--watch\" flag.","author":{"url":"https://github.com/tclzcja","@type":"Person","name":"tclzcja"},"datePublished":"2025-11-06T03:43:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/60599/node/issues/60599"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:380cacd8-220a-cbab-37f1-39f020998333 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE24:1F9980:FA0932:14ED04C:69698EE1 |
| html-safe-nonce | 7abb02549bbe5d0f27272da19612e9bd20e76d934ab4855d29bc231e08a1fd07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTI0OjFGOTk4MDpGQTA5MzI6MTRFRDA0Qzo2OTY5OEVFMSIsInZpc2l0b3JfaWQiOiI3ODQ0OTc2MTM5OTY2NTg0MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ce322ce8260b271eb37c0e4f7fae0ac32118e788cf3127cef867d6cd1a91b04c |
| hovercard-subject-tag | issue:3593807906 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/60599/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f6ea79a17308e33ee1d3fbc42de70e0cefc449ac581de4e71bcfb7c293e6aaf8/nodejs/node/issues/60599 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f6ea79a17308e33ee1d3fbc42de70e0cefc449ac581de4e71bcfb7c293e6aaf8/nodejs/node/issues/60599 |
| og:image:alt | Version v25.1.0 Platform Microsoft Windows NT 10.0.26200.0 x64 Subsystem No response What steps will reproduce the bug? Create .a.env, and .b.env. .a.env includes: "ENV_VAR_A=123". .b.env includes:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tclzcja |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width