-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Description
Which @angular/* package(s) are the source of the bug?
cli
Is this a regression?
Yes
Description
As of CLI version 20.1.0, running any ng
command, regardless of the project and even in a global context, results in the error below.
Version 20.0.6 does not result in an error.
Unknown error: Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\SebastianPost\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\yargs\helpers\helpers.mjs from C:\Users\SebastianPost\AppData\Roaming\npm\node_modules\@angular\cli\src\command-builder\command-module.js not supported.
Instead change the require of C:\Users\SebastianPost\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\yargs\helpers\helpers.mjs to a dynamic import() which is available in all CommonJS modules.

Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 20.1.0
Node: 22.18.0
Package Manager: npm 10.9.3
OS: win32 x64
Metadata
Metadata
Assignees
Labels
No labels