Closed
Description
🐞 Bug report
Command (mark with an x
)
- update
Is this a regression?
No
Description
Yarn 2 allows using custom protocols for dependencies. A current list is available here:
https://yarnpkg.com/features/protocols
It seems that when trying to use ng update
for migrations, the process fails because it thinks it finds a malformed specifier.
I believe this should not be a hard error, but perhaps just a warning. It is safe to ignore these dependencies.
Note that this error occurs with the currently compatible Yarn2/Angular mode of using the standard node_modules
linker. See: #16980
Relevant section of code:
angular-cli/packages/schematics/update/update/index.ts
Lines 869 to 871 in e22c196
🔬 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 add @angular/cli@latest
yarn add @angular/material@8.2.3
yarn add src@link:./src
yarn ng update @angular/material --allow-dirty
🔥 Exception or Error
Repository is not clean. Update changes will be mixed with pre-existing changes.
Using package manager: 'yarn'
Collecting installed dependencies...
Found 31 dependencies.
Fetching dependency metadata from registry...
✖ Migration failed: Failed to parse dependency "src" with specifier "link:./src" from package.json. Is the specifier malformed?
See "/tmp/ng-SLmx6n/angular-errors.log" for further details.
🌍 Your Environment
ngular 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