通過執行命令ng構建構建我的角度2應用程序時,我收到以下錯誤消息。 「這個版本的cli只兼容角度版本2.3.1或更高版本,請升級你的角度版本。」此版本的cli只與角度版本2.3.1或更高版本兼容
下面是的package.json文件
{
"name": "mrdb.web",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/material": "^2.0.0-beta.6",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.0.6",
"@angular/compiler-cli": "^2.0.0",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
好的。你的問題是什麼?這消息不是很清楚嗎? –
我是新來的角。我認爲角2.0.0是角2的最新版本。如果我需要使用角2,什麼是最新版本 – Tom
最新版本的Angular是1.4.3(請參閱https://github.com/angular/angular /blob/master/CHANGELOG.md)。我真的不明白爲什麼你會強迫你使用Angular的過時版本。 Angular 4和Angular 2是相同的框架。該版本因最小的重大更改而升級,就這些了。 –