Skip to content

Commit 39cbffc

Browse files
committed
fix(@angular/cli): improve Node.js version check and error messages
Enhances the Node.js version validation to include Node.js 22.12
1 parent 63d542c commit 39cbffc

File tree

1 file changed

+7
-3
lines changed
  • packages/angular/cli/bin

1 file changed

+7
-3
lines changed

packages/angular/cli/bin/ng.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ if (version[0] % 2 === 1) {
5555
);
5656

5757
require('./bootstrap');
58-
} else if (version[0] < 20 || (version[0] === 20 && version[1] < 11)) {
59-
// Error and exit if less than 20.11
58+
} else if (
59+
version[0] < 20 ||
60+
(version[0] === 20 && version[1] < 19) ||
61+
(version[0] === 22 && version[1] < 12)
62+
) {
63+
// Error and exit if less than 20.19 or 22.12
6064
console.error(
6165
'Node.js version ' +
6266
process.version +
6367
' detected.\n' +
64-
'The Angular CLI requires a minimum Node.js version of v20.11.\n\n' +
68+
'The Angular CLI requires a minimum Node.js version of v20.19 or v22.12.\n\n' +
6569
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n',
6670
);
6771

0 commit comments

Comments
 (0)