fix: remove node-abort-controller polyfill breaking Node 24 compatibility#927
Merged
pru55e11 merged 1 commit intoMay 22, 2026
Merged
Conversation
…ility Node 24 tightened validation in events.setMaxListeners() to require true EventEmitter/EventTarget instances. The node-abort-controller polyfill's AbortSignal is a plain object, causing ERR_INVALID_ARG_TYPE crashes during aio app init. The polyfill was added for Node <=16.13 compat and is no longer needed since engines.node is >=20. Fixes ACNA-4621
Contributor
There was a problem hiding this comment.
🤖 PR Reviewer
This diff removes the node-abort-controller polyfill dependency and its global assignment. This is a clean, positive change assuming the minimum supported Node.js version is 15+ (where AbortController is globally available natively) or 16.17+/18+ (where it is unflagged/stable). No issues found.
✅ LGTM! This PR looks good to merge.
💡 How to re-trigger
Comment /review or /pr-reviewer on this PR
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
MichaelGoberling
approved these changes
May 22, 2026
mgar
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node-abort-controllerpolyfill fromsrc/BaseCommand.js(lines 13-14) that globally replaced the nativeAbortControllernode-abort-controllerfrompackage.jsondependenciesaio app initcrashing on Node 24 withERR_INVALID_ARG_TYPE: The "eventTargets" argument must be an instance of EventEmitter or EventTargetRoot cause: Node 24 tightened validation in
events.setMaxListeners()to require trueEventEmitter/EventTargetinstances. The polyfill'sAbortSignalis a plain object, so oclif/core callingsetMaxListenerswith the abort signal during command init triggers the error. The polyfill was originally added for Node ≤16.13 compatibility and has been unnecessary sinceengines.nodewas bumped to>=20.Fixes ACNA-4621
Test plan
test/commands/app/test.test.jsSIGSEGV is unrelated, reproduces onmasterwithout this change)nvm use 24 && aio app init <name>no longer crashes during post-templatenpm installnvm use 22still works as expected