-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
2022Q3 FixitCandidates for the Q3 2022 fix-itCandidates for the Q3 2022 fix-itarea: @angular/clifreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyng update DXseverity3: brokentype: bug/fixyarn 2+
Milestone
Description
🐞 Bug report
Command (mark with an x
)
- update
Is this a regression?
No
Description
When using Yarn 2 these flags are not supported:
angular-cli/packages/angular/cli/utilities/install-package.ts
Lines 168 to 174 in b7890b6
return { | |
silent: '--silent', | |
saveDev: '--dev', | |
install: 'add', | |
prefix: '--modules-folder', | |
noLockfile: '--no-lockfile', | |
}; |
This results in an error installing the @angular/cli
when the locally installed version is not the latest.
A workaround is to run yarn add @angular/cli@latest
to manually update the cli version prior to invoking ng update
Also see: #16980
🔬 Minimal Reproduction
cd /tmp
ng new --skip-install ngupdate-repro
cd ngupdate-repro
yarn set version 2
yarn config set nodeLinker node-modules
yarn install
yarn ng update
🔥 Exception or Error
yarn ng update
(node:7598) ExperimentalWarning: Conditional exports is an experimental feature. This feature could change at any time
The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
Installing packages for tooling via yarn.
An unhandled exception occurred: Unknown Syntax Error: Command not found; did you mean one of:
0. yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] ...
1. yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] ...
While running add @angular/cli@latest --silent --modules-folder=/tmp/angular-cli-packages-41IvHp/node_modules --no-lockfile
Package install failed, see above.
See "/tmp/ng-pACkYq/angular-errors.log" for further details.
🌍 Your Environment
Angular CLI: 10.2.0
Node: 13.7.0
OS: linux x64
Angular: 10.1.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1001.7
@angular-devkit/build-angular 0.1001.7
@angular-devkit/core 10.2.0
@angular-devkit/schematics 10.2.0
@angular/cli 10.2.0
@angular/material 8.2.3
@schematics/angular 10.2.0
@schematics/update 0.1002.0
rxjs 6.6.3
typescript 4.0.3
imaksp, devoto13, examan, sirrocco, ybeauchamph and 6 more
Metadata
Metadata
Assignees
Labels
2022Q3 FixitCandidates for the Q3 2022 fix-itCandidates for the Q3 2022 fix-itarea: @angular/clifreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyng update DXseverity3: brokentype: bug/fixyarn 2+