当我跑的时候
ng build
我得到以下错误:
角度编译器中的错误要求TypeScript>=3.4.0和<3.6.0,但找到的却是3.7.4。
但是在我的
package.json
,我已经定义了
"typescript": "^3.5.3"
我在项目的档案中发现了
3.7.4
它不会出现在任何地方,那么为什么Angular CLI认为这是指定的版本?
我正在使用节点12.13.0。
这是我的全部
包.json
:
{
"name": "my-app",
"version": "0.0.0",
"scripts": {
"postinstall": "npm run build",
"ng": "ng",
"dev": "ng build --aot --watch",
"dtos": "tsd-ref && ts-ref",
"build": "ng build --prod",
"publish": "npm run build",
"lint": "ng lint",
"test": "ng test",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.2.14",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/http": "^7.2.15",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@servicestack/angular": "0.0.8",
"@servicestack/client": "^1.0.31",
"bootstrap": "^4.4.1",
"core-js": "^3.6.1",
"rxjs": "^6.5.4",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.21",
"@angular/cli": "^8.3.21",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@types/jasmine": "^3.5.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^12.12.22",
"codelyzer": "^5.2.1",
"gulp": "^4.0.2",
"jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "~3.0.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.5.1",
"protractor": "^5.4.2",
"ts-node": "^8.5.4",
"tslint": "^5.20.1",
"typescript": "^3.5.3"
}
}