Skip to content

Can't disable typescriptMismatch warning #7678

Closed

Description

@xnnkmd

Bug Report or Feature Request (mark with an x)

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

When want to disable the typescriptMismatch warning on a project-basis so it only affects a particular project and the warning is automatically disabled for other developers. Hence, I want to disable it from within the angular-cli config file.

Versions.

@angular/cli: 1.4.1
node: 7.7.1
os: win32 x64
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.4.1
@angular/compiler-cli: 4.3.6
typescript: 2.5.2

Repro steps.

Setup angular project to use latest typescript.

Add this to .angular-cli.json:

    "warnings": {
        "typescriptMismatch": false
    }

run "ng build"

The output given by the failure.

@angular/compiler-cli@4.3.6 requires typescript@'>=2.1.0 <2.4.0' but 2.5.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.1.0 <2.4.0'

To disable this warning run "ng set --global warnings.typescriptMismatch=false".

Desired functionality.

When I disable the typescriptMismatch warning in .angular-cli.json I expect the warning to disappear when running ng build.

Mention any other details that might be useful.

It might be possible to disable the warning instead by setting a global flag but I want something that only affects a single project yet is shared with other developers automatically. Setting a global flag won't do that.

Activity

  1. added
    P3
    on Sep 22, 2017
  2. filipesilva commented on Sep 25, 2017

    @filipesilva
    Contributor

    Currently we only support disabling it globally, but I agree it would be good to work locally as well. Will implement.

  3. added a commit that references this issue on Sep 26, 2017
    3b13d38
  4. added
    feature
    and removed on Sep 26, 2017
  5. added 3 commits that reference this issue on Sep 26, 2017
    631c9fd
    870c4d6
    fa35a32
  6. added a commit that references this issue on Apr 23, 2018
    e7f3d21
  7. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Sep 7, 2019
  9. added a commit that references this issue on May 29, 2026
    0df056d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions