fix(instrumentation): remove process.once Edge warnings - #1264
Conversation
LING-6150
left a comment
There was a problem hiding this comment.
Thanks for the focused patch. The implementation itself looks appropriately scoped, and I don’t have any code-level blockers.
Before merging, please correct the PR title/body and #1262 so they match the observed behavior.
With Next.js 16.1.2, the inline process.once calls produce two Edge Runtime warnings, but next build still completes successfully with exit code 0. This patch removes those warnings; it does not fix a compile failure.
I also reproduced the warnings with a Node-runtime proxy.ts and an empty Edge middleware manifest, so having an explicit Edge runtime entry is not a required condition.
Please update:
- The PR title and summary to describe removing Edge build warnings rather than fixing a compile failure.
- The verification section to state that the build succeeds before and after the patch.
- #1262’s title/body and reproduction conditions accordingly.
- The malformed Closes #1262" reference.
An accurate framing would be: this removes two build-time Edge warnings while preserving the existing Node-side shutdown behavior. In addition, please also modify the title as "fix(instrumentation): remove process.once Edge warnings" .
No code changes are requested.
|
Thanks for addressing the review feedback so promptly. I’ve confirmed that this patch removes the two non-blocking Edge warnings while preserving the existing Node-side behavior. |
Summary
This removes two build-time Edge warnings that occur during pnpm dev, while preserving the existing Node-side shutdown behavior.
Related Issues
Fixes #1262
Changes
lib/server/shutdown-signals.tswithregisterShutdownSignals(shutdown).instrumentation.ts, replace the inlineprocess.oncecalls with a dynamic import and call:await import('@/lib/server/shutdown-signals')→registerShutdownSignals(shutdown).Type of Change
Verification
Steps to reproduce / test