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 to v7rc has TypeScript dependency issue (v 6.0.5)

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
- [x ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node 8.10.0 npm 6.2.0 Windows 10

Angular CLI: 6.0.5 Node: 8.10.0 OS: win32 x64 Angular: 6.0.3 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.6.5 @angular-devkit/build-angular 0.6.5 @angular-devkit/build-optimizer 0.6.5 @angular-devkit/core 0.6.5 @angular-devkit/schematics 0.6.5 @angular/cli 6.0.5 @ngtools/webpack 6.0.5 @schematics/angular 0.6.5 @schematics/update 0.6.5 rxjs 6.2.0 typescript 2.7.2 webpack 4.8.3

Repro steps

ng update @angular/core @angular/cli --next

Sample repo: https://github.com/DeborahK/Angular-NgRx-GettingStarted/tree/master/APM-Demo4

When I run the ng update command against this repo, I get the error indicated in the log below and the ng update does not run.

The log given by the failure

Package “@angular/compiler-cli” has an incompatible peer dependency to “typescript” (requires “>=3.1.1 ❤️.2”, would install “2.7.2”) Incompatible peer dependencies found. See above.

Desired functionality

Should successfully run ng update

Mention any other details that might be useful

The package-lock.json file for this version includes the following:

    "@schematics/angular": {
      "version": "0.6.5",
      "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-0.6.5.tgz",
      "integrity": "sha512-oB9j+IqVtoSn3kEV6mnBslG8pxaOlUW2Kw7aCVf9DzEqTZEH5awKuPuhRkAVyiXdwHPDn21xoUGVRLy4y/BafA==",
      "dev": true,
      "requires": {
        "@angular-devkit/core": "0.6.5",
        "@angular-devkit/schematics": "0.6.5",
        "typescript": ">=2.6.2 <2.8"
      }
    },

If I manually change the typescript line to this:

"typescript": ">=2.6.2 <2.10"

It executes ng update as expected.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
StephenFluincommented, Oct 4, 2018

@noelmace We’ll be publishing full update instructions, but today it should be as easy as ng update --next @angular/cli @angular/core.

1reaction
alexeaglecommented, Oct 4, 2018

I think @StephenFluin will explain how the upgrade process works, in the past we were careful to say which order to update things in.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm - When upgrading Angular 5 to 6, I get incompatible peer ...
The problem is that I get an error when running this command: ng update @angular/core Package "@angular/flex-layout" has an incompatible peer ...
Read more >
How To Update Angular CLI To Latest Version
To update Angular CLI to latest version Angular, use ng update @angular/core @angular/cli@latest command.
Read more >
ng update - Angular
Create source control commits for updates and migrations. Aliases: -C. boolean, false. --force. Ignore peer dependency version mismatches.
Read more >
Upgrade Angular 5 app to Angular 6 with Visual Studio 2017
Next, run ng update to identify and update other dependencies. Angular 6 now depends on TypeScript 2.7 and RxJS 6. So, we need...
Read more >
Upgrade Angular App to latest version - Medium
ng update @angular/core @angular/cli. While upgrading I ran into below problems. Package "@angular/fire" has an incompatible peer dependency ...
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