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
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When the Node.js version is v22.2.0 (released on 2024-05-15), the ng build command hangs up. Node.js v22.1.0 doesn't.
Angular CLI is not supporting that version of Node.js officially, but on Firebase App Hosting, the build environment is using Node.js v22.2 today by default. So it is an easy situation for developers to get stumped.
My workaround is to set engines.node field in package.json as "20". App Hosting builder can determine the Node.js version to install.
Minimal Reproduction
set Node.js version to v22.2.0
ng new on @angular/cli@latest (v17.3.7)
ng build
print Building... and never finished.
Exception or Error
No response
Your Environment
Angular CLI: 17.3.7
Node: 22.2.0 (Unsupported)
Package Manager: pnpm 8.15.6
OS: darwin arm64
Angular: 17.3.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1703.7
@angular-devkit/build-angular 17.3.7
@angular-devkit/core 17.3.7
@angular-devkit/schematics 17.3.7
@angular/cli 17.3.7
@angular/ssr 17.3.7
@schematics/angular 17.3.7
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.6
Warning: The current version of Node (22.2.0) is not supported by Angular.
Unfortunately, this is a regression introduced by Node.js, and it's not something we can address on our end. For more details, see: Node.js Issue #53097.
Reacted by Suguru Inatomi, Kohei Nakasuji and Keanu Ashwell
It seems that the "regression" was intentional from Node.js' perspective. Unfortunately, this breaking behaviour happened in a minor version of Node.js, We will need to put in some work to address it on our end as it's not as trivial to solve.
Activity
JoostK commentedon May 22, 2024
Does this repro using Angular 18 RCs?
lacolaco commentedon May 22, 2024
@JoostK Yes, it reproduces the same situation even after
ng update @angular/core @angular/cli --next.alan-agius4 commentedon May 22, 2024
Unfortunately, this is a regression introduced by Node.js, and it's not something we can address on our end. For more details, see: Node.js Issue #53097.
alan-agius4 commentedon May 23, 2024
It seems that the "regression" was intentional from Node.js' perspective. Unfortunately, this breaking behaviour happened in a minor version of Node.js, We will need to put in some work to address it on our end as it's not as trivial to solve.
alan-agius4 commentedon Jun 3, 2024
There has been a revert in Node.js that will fix this in their next release. See: nodejs/TSC#1566 (comment) for more information.
angular-automatic-lock-bot commentedon Jul 4, 2024
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.