2016-05-30 77 views
0

當我試圖將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" 
    }`  
+0

只是看行無12錯誤:沒有這樣的文件或目錄..一個可能從angular.io/docs/ts/latest/quickstart.html比較pacages或可能是M:\ workspace \ Angular2StartKit路徑問題 – mayur

+0

從rc1的文檔:通過在終端/控制檯窗口中運行node -v和npm -v來驗證您正在運行節點「v5.x.x」和npm「3.x.x」。較舊和較新的版本會產生錯誤。 – Alexandr

回答

1

在Angular2 RC1,有你需要在你package.json指定一組子包文件不是一個大包像Beta版:

{ 
    (...) 
    "dependencies": { 
    "@angular/common": "2.0.0-rc.1", 
    "@angular/compiler": "2.0.0-rc.1", 
    "@angular/core": "2.0.0-rc.1", 
    "@angular/http": "2.0.0-rc.1", 
    "@angular/platform-browser": "2.0.0-rc.1", 
    "@angular/platform-browser-dynamic": "2.0.0-rc.1", 
    "@angular/router": "2.0.0-rc.1", 
    "@angular/router-deprecated": "2.0.0-rc.1", 
    "@angular/upgrade": "2.0.0-rc.1", 
    (...) 
    } 
} 
+0

這將意味着我必須更改我的文件中的所有進口...感嘆 – user2180794

+0

您在package.json文件中使用Angular2 beta1? –

+1

是的,這是正確的。由於RC引起了問題,我將它改回到了測試版。我會嘗試你的建議,分開包括所有的軟件包。 – user2180794