Skip to content

Webpack 5 + babel config bug in Angular 12.0.0 - asyncToGenerator failed to resolve. #20800

Closed
@andygup

Description

@andygup

Bug Report

Affected Package

Angular 12.0.0

Is this a regression?

Brand new issue for 12.0.0

Description

App works fine with 11.2.5. Simply upgraded from 11.2.5 to 12.0.0 now I'm getting many build errors that say:

node_modules/@babel/runtime/helpers/esm/asyncToGenerator' failed to resolve

Minimal Reproduction

npm i on this repo jsapi-angular-cli.zip and then run ng serve --open and the build will fail with errors. When the app works you'll see a map.

Exception or Error


./node_modules/@arcgis/core/widgets/support/chartUtils.js:1:0-160 - Error: Module not found: Error: Can't resolve '/Users/xyz/web/code/jsapi-resources/esm-samples/jsapi-angular-cli/node_modules/@babel/runtime/helpers/esm/asyncToGenerator' in '/Users/xyz/web/code/jsapi-resources/esm-samples/jsapi-angular-cli/node_modules/@arcgis/core/widgets/support'
Did you mean 'asyncToGenerator.js'?
BREAKING CHANGE: The request '/Users/xyz/web/code/jsapi-resources/esm-samples/jsapi-angular-cli/node_modules/@babel/runtime/helpers/esm/asyncToGenerator' failed to resolve only because it was resolved as fully specified
(probably because the origin is a '*.mjs' file or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

Your Environment

Angular Version:


12.0.0

Anything else relevant?
No

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions