我昨天决定加入角度世界,但是让球滚动有点麻烦。我决定点击此处的快速入门指南:https://angular.io/guide/quickstart。但是,当我进入第1部分c时,我不断收到错误说明:
" ERR!未找到版本:@ angular / router-deprecated @ 2.0.0-rc.3"
我认为问题出在我的package.json中,看起来像这样:
{
"name": "angular2-quickstart",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"license": "ISC",
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/forms": "0.1.1",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/router": "3.0.0-alpha.7",
"@angular/router-deprecated": "2.0.0-rc.3",
"@angular/upgrade": "2.0.0-rc.3",
"systemjs": "0.19.27",
"core-js": "^2.4.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"angular2-in-memory-web-api": "0.0.12",
"bootstrap": "^3.3.6"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings":"^1.0.4"
}
}
我已经尝试全局同时安装lite-server和typescript。还有其他想法吗?
感谢。
答案 0 :(得分:0)
您可以随时查看npmjs.com上的可用版本:
https://www.npmjs.com/package/@angular/router-deprecated
2.0.0-rc.2 is the latest of 5 releases
教程使用的是rc-2版本。
答案 1 :(得分:0)
只需升级到node.js的最新版本即可。 DERP。