Skip to content

ng update error with pnpm #16149

@tao-cumplido

Description

@tao-cumplido

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Don't know...

Description

I get the below error when running ng update --next with pnpm as the configured package manager. It says, the installed CLI is older than the latest published, but it isn't.

🔬 Minimal Reproduction

package.json

{
    "name": "test",
    "private": true,
    "scripts": {
        "ng": "ng"
    },
    "dependencies": {
        "@angular/animations": "~8.2.10",
        "@angular/cdk": "^8.2.3",
        "@angular/common": "~8.2.10",
        "@angular/compiler": "~8.2.10",
        "@angular/core": "~8.2.10",
        "@angular/forms": "~8.2.10",
        "@angular/material": "^8.2.3",
        "@angular/platform-browser": "~8.2.10",
        "@angular/platform-browser-dynamic": "~8.2.10",
        "@angular/router": "~8.2.10",
        "rxjs": "~6.5.3",
        "tslib": "^1.10.0",
        "zone.js": "~0.10.2"
    },
    "devDependencies": {
        "@angular-devkit/build-angular": "~0.803.14",
        "@angular/cli": "~8.3.18",
        "@angular/compiler-cli": "~8.2.10",
        "@angular/language-service": "~8.2.10",
        "typescript": "~3.5.3"
    }
}

angular.json

{
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "cli": {
        "packageManager": "pnpm"
    }
}
pnpm install
pnpm run ng update -- --next

🔥 Exception or Error


The installed Angular CLI version is older than the latest published version.
Installing a temporary version to perform the update.
Installing packages for tooling via pnpm.
 ERROR  Unknown option 'loglevel'
For help, run: pnpm help add
An unhandled exception occurred: Package install failed, see above.
See "C:\Users\taocu\AppData\Local\Temp\ng-1A0CYk\angular-errors.log" for further details.
Scope: current workspace package
 ERROR  Command failed.

🌍 Your Environment


Angular CLI: 8.3.18
Node: 12.13.0
OS: win32 x64
Angular: 8.2.13
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       
@angular-devkit/build-angular   0.803.17
@angular-devkit/core            
@angular-devkit/schematics      
@angular/cdk                    8.2.3
@angular/cli                    8.3.18
@angular/material               8.2.3
@schematics/angular             
@schematics/update              
rxjs                            6.5.3
typescript                      3.5.3

Anything else relevant?

pnpm 4.2.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions