watch: remove NODE_OPTIONS from spawn call to prevent infinite loop by viiktordev · Pull Request #61838 · nodejs/node · GitHub
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

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

@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

@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