Skip to content

[V19] Updating a project in pnpm mono-repo, throws cli mismatch version error #58832

@spock123

Description

@spock123

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

Previously when updating a project within our mono-repo (using pnpm, consisting of many angular projects, mostly on v18.2), there were no issues upgrading project-by project.

This time when serving after upgrade, we get a cli mismatch error.
This only happens when running in a mono repo with pnpm.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

% npm run start

> start
> ng serve --host=0.0.0.0 --open

Localization (`localize` option) has been disabled. The development server only supports localizing a single locale per build.
This version of CLI is only compatible with Angular versions ^18.0.0,
but Angular version 19.0.0 was found instead.
Please visit the link below to find instructions on how to update Angular.
https://update.angular.dev/

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 19.0.1
Node: 20.18.0
Package Manager: pnpm 8.10.5
OS: darwin arm64

Angular: 19.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, material, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.1 (cli-only)
@angular-devkit/build-angular   19.0.1
@angular-devkit/core            19.0.1 (cli-only)
@angular-devkit/schematics      19.0.1 (cli-only)
@angular/cli                    19.0.1
@angular/ssr                    19.0.1
@schematics/angular             19.0.1 (cli-only)
rxjs                            7.5.7
typescript                      5.6.3
zone.js                         0.15.0

Anything else?

Tried re-installing deps, pnpm-lock in root folder, etc.

It seems there is something going on with pnpm and version handling of the cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions