You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug]: Uncaught SyntaxError: The requested module '/node_modules/@babel/runtime/regenerator/index.js?v=8bc5bdce' does not provide an export named 'default'
#13498
Closed
1 task
JesusTheHun opened this issue
Jun 22, 2021
· 6 comments
Hey @JesusTheHun! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite."
regenerator-runtime only provides a CJS entry point. You need to configure your bundler to support CJS files, or you cannot transform generators to ES5.
💻
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
Using
esbuild
and@testing-library/dom
I run into this error :Uncaught SyntaxError: The requested module '/node_modules/@babel/runtime/regenerator/index.js?v=8bc5bdce' does not provide an export named 'default'
Because
@testing-library/dom
uses `import _regeneratorRuntime from '/node_modules/@babel/runtime/regenerator/index.js';Sadly this file https://github.com/babel/babel/blob/main/packages/babel-runtime/regenerator/index.js lacks of the
default
export.Configuration file name
No response
Configuration
No response
Current and expected behavior
https://github.com/babel/babel/blob/main/packages/babel-runtime/regenerator/index.js
should have thedefault
export.Environment
@babel/runtime@7.14.6
System: OS: macOS 11.4 Binaries: Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node Yarn: 2.4.1 - /usr/local/bin/yarn npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm npmPackages: @babel/core: ^7.14.6 => 7.14.6 @babel/eslint-parser: ^7.14.5 => 7.14.5 babel-loader: ^8.2.2 => 8.2.2 eslint: ^7.5.0 => 7.28.0 jest: ^27.0.4 => 27.0.4
Possible solution
Add the default export
Additional context
No response
The text was updated successfully, but these errors were encountered: