當我試圖將angular2升級到RC時,出現以下錯誤。 JWT是有鋼筋混凝土的依賴,所以我不得不更新到@angular無法更新到Angular2 RC @ angular @ 2.0.0-rc.1
M:\workspace\Angular2StartKit>npm install
npm ERR! addLocal Could not install M:\workspace\Angular2StartKit\@[email protected]
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\manish\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.2
npm ERR! npm v3.9.5
npm ERR! path M:\workspace\Angular2StartKit\@[email protected]
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'M:\workspace\Angular2StartKit\@[email protected]'
npm ERR! enoent ENOENT: no such file or directory, open 'M:\workspace\Angular2StartKit\@[email protected]'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! M:\workspace\Angular2StartKit\npm-debug.log
的package.json
"dependencies": {
"angular2": "2.0.0-beta.1",
"angular2-jwt": "^0.1.12",
"body-parser": "~1.13.2",
"cors": "^2.7.1",
"es6-promise": "3.0.2",
"es6-shim": "0.33.3",
"express": "4.13.3",
"express-jwt": "^3.4.0",
"gulp-concat": "2.6.0",
"material-design-lite": "^1.1.3",
"mongodb": "^2.1.16",
"mongoose": "^4.4.12",
"promise": "^7.1.1",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"systemjs": "0.19.16",
"zone.js": "0.5.10"
}`
只是看行無12錯誤:沒有這樣的文件或目錄..一個可能從angular.io/docs/ts/latest/quickstart.html比較pacages或可能是M:\ workspace \ Angular2StartKit路徑問題 – mayur
從rc1的文檔:通過在終端/控制檯窗口中運行node -v和npm -v來驗證您正在運行節點「v5.x.x」和npm「3.x.x」。較舊和較新的版本會產生錯誤。 – Alexandr