GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Warning message is displayed when using TypeScript 2.9.2 · Issue #11665 · angular/angular-cli

Warning message is displayed when using TypeScript 2.9.2 #11665

New issue
Copy link
New issue
Copy link
Closed
#11668
Closed
Warning message is displayed when using TypeScript 2.9.2#11665
#11668
Copy link

Description

@micksatana
micksatana
opened on Jul 26, 2018
Issue body actions

Angular version 6.1.0 support typescript 2.9. But when I change typescript dependency in package.json. This warning is shown.

@angular/[email protected] requires typescript@'>=2.7.0 <2.8.0' but 2.9.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install typescript@'>=2.7.0 <2.8.0'

To disable this warning run "ng config cli.warnings.typescriptMismatch false".

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
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node --version
v8.9.4
npm --version
6.2.0
ng --version
Angular CLI: 6.1.0
Node: 8.9.4
OS: darwin x64
Angular: 6.1.0
... animations, bazel, cli, common, compiler, compiler-cli, core
... forms, http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.0
@angular-devkit/build-angular     0.7.0
@angular-devkit/build-optimizer   0.7.0
@angular-devkit/build-webpack     0.7.0
@angular-devkit/core              0.7.0
@angular-devkit/schematics        0.7.0
@ngtools/webpack                  6.1.0
@schematics/angular               0.7.0
@schematics/update                0.7.0
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.9.2

Repro steps

  1. Create new angular project
    ng new testNg61
  2. Change typescript version in package.json to 2.9.2
  3. Run npm i
  4. Run ng serve

The log given by the failure

@angular/[email protected] requires typescript@'>=2.7.0 <2.8.0' but 2.9.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install typescript@'>=2.7.0 <2.8.0'

To disable this warning run "ng config cli.warnings.typescriptMismatch false".

Desired functionality

Serve correctly without showing the warning

Mention any other details that might be useful

versionCombos variable in node_modules/@angular/cli/upgrade/version.js seem not being built correctly. The codes in upgrade/version.ts file seem correct.

Reacted by Vincenzo, Michał Gołębiowski-Owczarek, Max-Richard Barz, Slava, agil-NUBBA, Claudiu Hojda, Vivien Zoonekynd, Claire, Steve Hipwell, Michael Kriese and 20 more

Activity

  1. gkalpak commented on Jul 26, 2018

    @gkalpak
    gkalpak
    on Jul 26, 2018
    Member
    More actions

    Related: angular/angular#25141

  2. sarunint
    added a commit that references this issue on Jul 26, 2018

    fix(@angular/cli): use correct compiler version range

    This issue will close once commit 3ab59a8 is merged into the 'master' branch.
    3ab59a8
  3. kylecordes commented on Jul 26, 2018

    @kylecordes
    kylecordes
    on Jul 26, 2018
    More actions

    As I recall from the last time there was such an upgrade, for various legacy reasons the compatibility version check is implemented in CLI, with the code of that understands the version relationship compiled into CLI (or dev kit). So they will need to be a CLI update to understand that a new range of Angular versions is compatible with the new range of TypeScript versions.

    So we are just a bit patient, likely the next new CLI version should understand the new versions, and contain any other needed tweaks to make it all run smoothly.

  4. hansl
    closed this as completedin #11668on Jul 26, 2018
  5. hansl
    added 2 commits that reference this issue on Jul 26, 2018

    fix(@angular/cli): use correct compiler version range

    This issue will close once commit 3fca66d is merged into the 'main' branch.
    3fca66d

    fix(@angular/cli): use correct compiler version range

    This issue will close once commit 1f19624 is merged into the 'main' branch.
    1f19624
  6. sarunint commented on Jul 26, 2018

    @sarunint
    sarunint
    on Jul 26, 2018
    Contributor
    More actions

    @sundarchi1 Yes, it does fix the issue when you already upgraded to TypeScript 2.9. The issue you've just raised is a separated issue in which Angular CLI generates TypeScript 2.7 as default.

    As for that issue, #11669 is pending.

    Reacted by Stefan Bley
  7. micksatana commented on Jul 27, 2018

    @micksatana
    micksatana
    on Jul 27, 2018
    Author
    More actions

    @sundarchi1 I tested on my local. the fix is complete. when change version to 2.9.2, no warning display.

  8. sebek64 commented on Aug 3, 2018

    @sebek64
    sebek64
    on Aug 3, 2018
    More actions

    Although this is probably not a big problem, I see that @schematics/[email protected] still has a dependency on typescript < 2.8. It installs a separate copy of typescript, so it is compatible with global typescript in version 2.9.

  9. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot
    angular-automatic-lock-botBot
    on Sep 8, 2019
    More actions

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  10. angular-automatic-lock-bot
    locked and limited conversation to collaborators on Sep 8, 2019
  11. mostafaibr
    added a commit that references this issue on May 29, 2026

    fix(@angular/cli): use correct compiler version range

    This issue will close once commit b4f4d34 is merged into the 'master' branch.
    b4f4d34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.