Is there an existing issue for this?
Current behavior
Summary
In a workspace using Angular 21 and Nx, npm install fails with ERESOLVE because @swc/cli 0.7.10 expects chokidar ^4.0.1, while Angular tooling resolves chokidar ^5.0.0.
Nest CLI currently declares @swc/cli peer support only through 0.7.x, which prevents using @swc/cli 0.8.x (where chokidar peer is ^5.0.0).
Environment
-
Node: 18.x (also reproducible on 20.x)
-
npm: 10.x
-
@nestjs/cli: 11.0.16
-
@swc/cli: 0.7.10
-
Angular toolchain: 21.2.x
-
Nx: 22.6.0
-
Observed behavior
-
npm install fails with ERESOLVE due to incompatible peer expectations for chokidar:
-
Angular devkit/compiler-cli ecosystem resolves chokidar ^5.0.0
-
@swc/cli 0.7.10 has peerOptional chokidar ^4.0.1
Representative error lines
While resolving: @swc/cli@0.7.10
Found: chokidar@5.0.0
Could not resolve dependency: peerOptional chokidar ^4.0.1 from @swc/cli@0.7.10
peerOptional @swc/cli "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0" from @nestjs/cli@11.0.16
Expected behavior
Nest CLI should allow an @swc/cli version that is compatible with chokidar 5 so modern Angular/Nx stacks can install without force flags.
Why this matters
This blocks dependency resolution in current Angular 21 projects
Minimum reproduction code
https://nx.dev/docs/getting-started/start-new-project
Steps to reproduce
create a new nx workspace space using Angular 21 and add Nest JS CLI
Expected behavior
Suggested fix
Expand Nest CLI peer range for @swc/cli to include 0.8.x, for example:
from: ^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0
to: ^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0
Additional context
npm view @swc/cli@latest shows 0.8.0 with peerDependencies chokidar ^5.0.0.
This appears to be a peer range lag in Nest CLI rather than a project-local misconfiguration.
Thanks for taking a look.
Package version
11.0.16
NestJS version
No response
Node.js version
No response
In which operating systems have you tested?
Other
No response
Is there an existing issue for this?
Current behavior
Summary
In a workspace using Angular 21 and Nx, npm install fails with ERESOLVE because @swc/cli 0.7.10 expects chokidar ^4.0.1, while Angular tooling resolves chokidar ^5.0.0.
Nest CLI currently declares @swc/cli peer support only through 0.7.x, which prevents using @swc/cli 0.8.x (where chokidar peer is ^5.0.0).
Environment
Node: 18.x (also reproducible on 20.x)
npm: 10.x
@nestjs/cli: 11.0.16
@swc/cli: 0.7.10
Angular toolchain: 21.2.x
Nx: 22.6.0
Observed behavior
npm install fails with ERESOLVE due to incompatible peer expectations for chokidar:
Angular devkit/compiler-cli ecosystem resolves chokidar ^5.0.0
@swc/cli 0.7.10has peerOptional chokidar ^4.0.1Representative error lines
While resolving: @swc/cli@0.7.10
Found: chokidar@5.0.0
Could not resolve dependency: peerOptional chokidar ^4.0.1 from @swc/cli@0.7.10
peerOptional @swc/cli "^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0" from @nestjs/cli@11.0.16
Expected behavior
Nest CLI should allow an @swc/cli version that is compatible with chokidar 5 so modern Angular/Nx stacks can install without force flags.
Why this matters
This blocks dependency resolution in current Angular 21 projects
Minimum reproduction code
https://nx.dev/docs/getting-started/start-new-project
Steps to reproduce
create a new nx workspace space using Angular 21 and add Nest JS CLI
Expected behavior
Suggested fix
Expand Nest CLI peer range for @swc/cli to include 0.8.x, for example:
from: ^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0
to: ^0.1.62 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0
Additional context
npm view @swc/cli@latest shows 0.8.0 with peerDependencies chokidar ^5.0.0.
This appears to be a peer range lag in Nest CLI rather than a project-local misconfiguration.
Thanks for taking a look.
Package version
11.0.16
NestJS version
No response
Node.js version
No response
In which operating systems have you tested?
Other
No response