Skip to content

watch: remove NODE_OPTIONS from spawn call to prevent infinite loop#61838

Open
viiktordev wants to merge 3 commits intonodejs:mainfrom
viiktordev:fix/watch-options-infinite-loop
Open

watch: remove NODE_OPTIONS from spawn call to prevent infinite loop#61838
viiktordev wants to merge 3 commits intonodejs:mainfrom
viiktordev:fix/watch-options-infinite-loop

Conversation

@viiktordev
Copy link

Fixes #61740

The loop occurs during the child process spawn in watch mode. I removed NODE_OPTIONS from the environment before calling spawn(), and it solved the issue.

I also confirmed that all other flags set in NODE_OPTIONS continue to work after the code update.

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Feb 15, 2026
@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (37ff1ea) to head (e9e40d5).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61838      +/-   ##
==========================================
- Coverage   89.74%   89.71%   -0.03%     
==========================================
  Files         675      675              
  Lines      204735   204797      +62     
  Branches    39348    39352       +4     
==========================================
+ Hits       183737   183738       +1     
- Misses      13269    13330      +61     
  Partials     7729     7729              

see 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

watch: NODE_OPTIONS=--watch causes infinite loop

2 participants