Closed
Description
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
- Create new angular project
ng new testNg61
- Change typescript version in
package.json
to 2.9.2 - Run
npm i
- 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.
Metadata
Metadata
Assignees
Labels
No labels