-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"AbortController is not defined" error on Node 14 #630
Labels
bug
Something isn't working
Comments
tylerbutler
added a commit
to microsoft/FluidFramework
that referenced
this issue
Mar 2, 2023
oclif released a new version; this PR upgrades the build-tools projects that use oclif to the latest. Most notable improvements for us: - Simplifies typing in inherited classes. - More consistent handling of args -- they're handled like flags now. - ESM-ready, but will wait to switch to ESM until we're using node 16. I also set the NODE_OPTIONS='--experimental-abortcontroller' environment variable as a workaround for oclif/core#630 in Node 14. More upgrade info at https://github.com/oclif/core/blob/main/MIGRATION.md.
This issue has been linked to a new work item: W-13823076 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Running any CLI based on
@oclif/core
2+ on Node 14 consistenly fails with "ReferenceError: AbortController is not defined" in some cases.To Reproduce
Steps to reproduce the behavior:
npx oclif generate my-oclif-core2-cli
nvm install 14 && nvm use 14
hello
command when the terminal is not interactive:head -n1 package.json | bin/dev hello -f NodeJS
Expected behavior
The CLI should produce the same output on Node 14 as it does on Node 16 or newer:
Screenshots
Environment (please complete the following information):
Additional context
The root cause seems to be in using the
AbortController
API assuming that it's always available. However, this API was added in Node 15 and is not available in Node 12 and 14. Since oclif claims to support Node 12+ it should either load an AbortController API polyfill or stop using this API.The text was updated successfully, but these errors were encountered: