Skip to content

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

Closed
viiktordev wants to merge 3 commits into
nodejs:mainfrom
viiktordev:fix/watch-options-infinite-loop
Closed

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

Conversation

@viiktordev

Copy link
Copy Markdown

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

codecov Bot commented Feb 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (9cc7fcc) to head (29cb7d6).
⚠️ Report is 1474 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61838      +/-   ##
==========================================
- Coverage   89.72%   89.71%   -0.01%     
==========================================
  Files         675      675              
  Lines      204797   204797              
  Branches    39344    39347       +3     
==========================================
- Hits       183752   183740      -12     
- Misses      13324    13335      +11     
- Partials     7721     7722       +1     

see 30 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.

@MoLow MoLow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altough this does fix the bug, it has a much wider affect, and it will prevent NODE_OPTIONS usage with --watch.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been marked as stale due to 90 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

@github-actions github-actions Bot added the stale Issues and PRs marked stale due to inactivity and scheduled for automatic closure. label Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

@github-actions github-actions Bot closed this Aug 27, 2026
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. stale Issues and PRs marked stale due to inactivity and scheduled for automatic closure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

watch: NODE_OPTIONS=--watch causes infinite loop

3 participants