Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI 8.0.0-beta.13 generate new project with wrong typescript version in package.json #14155

Closed
wpcfan opened this Issue Apr 13, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@wpcfan
Copy link

wpcfan commented Apr 13, 2019

馃悶 Bug report

Command (mark with an x)

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

Is this a regression?

No, we did not find this issue when using previous version

Description

CLI 8.00-beta.13 will generate wrong typescript version when generating new project.
The package.json generated set the typescript version to 3.3.3333

{
  "name": "demo",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~8.0.0-beta.11",
    "@angular/common": "~8.0.0-beta.11",
    "@angular/compiler": "~8.0.0-beta.11",
    "@angular/core": "~8.0.0-beta.11",
    "@angular/forms": "~8.0.0-beta.11",
    "@angular/platform-browser": "~8.0.0-beta.11",
    "@angular/platform-browser-dynamic": "~8.0.0-beta.11",
    "@angular/router": "~8.0.0-beta.11",
    "rxjs": "~6.4.0",
    "tslib": "^1.9.0",
    "zone.js": "~0.9.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.800.0-beta.7",
    "@angular/cli": "~8.0.0-beta.13",
    "@angular/compiler-cli": "~8.0.0-beta.11",
    "@angular/language-service": "~8.0.0-beta.11",
    "@types/node": "~8.9.4",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.3.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.13.1",
    "typescript": "~3.3.3333"
  }
}

馃敩 Minimal Reproduction

  1. issue the following command
ng new demo
  1. and then choose N when asking if adding Angular routing, choose CSS when asking which stylesheet technology

  2. cd demo && ng serve

will see an error

馃敟 Exception or Error


ERROR in The Angular Compiler requires TypeScript >=3.4.0 and <3.5.0 but 3.3.4000 was found instead.

馃實 Your Environment


Angular CLI: 8.0.0-beta.13
Node: 10.14.1
OS: darwin x64
Angular: 8.0.0-beta.12
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-beta.13
@angular-devkit/build-angular     0.800.0-beta.13
@angular-devkit/build-optimizer   0.800.0-beta.13
@angular-devkit/build-webpack     0.800.0-beta.13
@angular-devkit/core              8.0.0-beta.13
@angular-devkit/schematics        8.0.0-beta.13
@angular/cli                      8.0.0-beta.13
@ngtools/webpack                  8.0.0-beta.13
@schematics/angular               8.0.0-beta.13
@schematics/update                0.800.0-beta.13
rxjs                              6.4.0
typescript                        3.3.4000
webpack                           4.29.6

Anything else relevant?

@alan-agius4

This comment has been minimized.

Copy link
Collaborator

alan-agius4 commented Apr 14, 2019

Hi, thanks for reporting this.

This has been addressed in #14147 and will be fixed in the next beta release.

In the meantime, you can manually update the TypeScript version to 3.4 to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.