question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng update not compatible with yarn

See original GitHub issue

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

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

Versions

Repro steps

We have been using yarn for some time now and it has been working fine… but now with “ng update” it feels as yarn.lock file is not used properly?

Running ng update tells me @angular/cli needs update… then running ng update @angular/cli does nothing but tell me that all looks good… ?

To get rid of this issue I can just run npm install to generate the package-lock.json file and then run ng update @angular/cli and it works…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
clydincommented, Oct 26, 2018

Using the lock file would be a potential optimization for installed package discovery, not a fix for any of the issues discussed in this thread.

1reaction
a01fecommented, Oct 25, 2018

@clydin No, npm is not installed. I manually updated @angular/cli with:

yarn global remove @angular/cli
yarn remove @angular/cli
yarn global add @angular/cli
yarn add @angular/cli --dev

Output from ng --version:


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 7.0.3
Node: 10.12.0
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    <error>
@angular-devkit/core         <error>
@angular-devkit/schematics   <error>
@schematics/angular          <error>
@schematics/update           <error>
rxjs                         <error>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular CLI with yarn - Stack Overflow
How to change package manager for Angular Cli v6.0.3 to yarn? I tried: ng set -- ...
Read more >
@angular/upgrade | Yarn - Package Manager
BREAKING CHANGES. Minified UMD bundles are no longer included in the distributed NPM packages. ... core: Previously the ng.getDirectives function threw an error ......
Read more >
ng update - Angular
Create source control commits for updates and migrations. Ignore peer dependency version mismatches. Version from which to migrate from.
Read more >
npm-check-updates
npm install # update installed packages and package-lock.json ... (default: false) -m, --minimal Do not upgrade newer versions that are ...
Read more >
NPM vs. Yarn: Which Package Manager Should You Choose?
However, in Yarn 2, the folder will no longer be supported, by default. ... Here is how to update npm dependencies. In both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found