-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng build fails with: An error occurred while extracting routes. #28683
Comments
Hi @json-derulo, I am not able to reproduce the above error with the steps provided.
|
@alan-agius4 I copied the exact command you were using, still I'm getting the same error. I also tried running
|
@alan-agius4 I verified that it's only an issue with MacOS in a reproduction repository. In the following GitHub actions run you can see that the build succeeds on Ubuntu and Windows, but fails on MacOS. |
Umm… interesting @json-derulo, thanks for checking, I’ll take a look tomorrow. |
It turns out the issue is related to the Node.js version. It seems there have been subtle changes in the ESM loader hooks. I’ll have a fix ready soon. |
… prerendering or SSR In Node.js 20, changes to ESM loader hooks result in the `--import` execArgv being passed from the parent to child workers. This commit resolves the issue by setting an empty `execArgv` in the JavaScript transformer, preventing unintended propagation. Closes angular#28683
… prerendering or SSR In Node.js 20, changes to ESM loader hooks result in the `--import` execArgv being passed from the parent to child workers. This commit resolves the issue by setting an empty `execArgv` in the JavaScript transformer, preventing unintended propagation. Closes angular#28683 (cherry picked from commit cc345b0)
… prerendering or SSR In Node.js 20, changes to ESM loader hooks result in the `--import` execArgv being passed from the parent to child workers. This commit resolves the issue by setting an empty `execArgv` in the JavaScript transformer, preventing unintended propagation. Closes #28683 (cherry picked from commit cc345b0)
Command
build
Is this a regression?
The previous version in which this bug was not present was
19.0.0-next.9
Description
When running
ng build
on a freshly generated Angular 19 prerelease project, an error is thrown.Minimal Reproduction
npx @angular/cli@next new
and enable SSRng build
Exception or Error
Your Environment
Angular CLI: 19.0.0-next.12
Node: 20.18.0
Package Manager: npm 10.9.0
OS: darwin x64
Angular: 19.0.0-next.10
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
@angular-devkit/architect 0.1900.0-next.12
@angular-devkit/build-angular 19.0.0-next.12
@angular-devkit/core 19.0.0-next.12
@angular-devkit/schematics 19.0.0-next.12
@angular/cli 19.0.0-next.12
@angular/ssr 19.0.0-next.12
@schematics/angular 19.0.0-next.12
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: