2016-09-01 52 views
0

我試圖在cloud9上安裝node/angular2解決方案。這是我的package.json爲什麼rxjs一直不是正確的版本?

{ 
    "name": "example", 
    "version": "0.0.0", 
    "private": true, 
    "scripts": { 
    "start": "node ./bin/www", 
    "postinstall": "typings install", 
    "typings": "typings", 
    "vendor": "gulp vendor", 
    "gulp": "gulp clean && gulp", 
    "build:production": "gulp clean && gulp build && node systemjs.builder.js" 
    }, 
    "dependencies": { 
    "@angular/common": "2.0.0-rc.5", 
    "@angular/compiler": "2.0.0-rc.5", 
    "@angular/core": "2.0.0-rc.5", 
    "@angular/forms": "0.3.0", 
    "@angular/http": "2.0.0-rc.5", 
    "@angular/platform-browser": "2.0.0-rc.5", 
    "@angular/platform-browser-dynamic": "2.0.0-rc.5", 
    "@angular/router": "3.0.0-rc.1", 
    "@angular/upgrade": "2.0.0-rc.5", 
    "body-parser": "~1.15.2", 
    "cookie-parser": "~1.4.3", 
    "core-js": "^2.4.1", 
    "debug": "~2.2.0", 
    "express": "~4.14.0", 
    "hbs": "~3.1.0", 
    "mongoose": "^4.5.8", 
    "mongoose-unique-validator": "^1.0.2", 
    "morgan": "~1.6.1", 
    "reflect-metadata": "^0.1.3", 
    "rxjs": "5.0.0-beta.11", 
    "serve-favicon": "~2.3.0", 
    "systemjs": "0.19.36", 
    "zone.js": "^0.6.12" 
    }, 
    "devDependencies": { 
    "del": "^2.2.1", 
    "gulp": "^3.9.0", 
    "gulp-sourcemaps": "^1.6.0", 
    "gulp-typescript": "^2.10.0", 
    "systemjs-builder": "^0.15.26", 
    "typings": "^1.3.2" 
    } 
} 

儘管這是怎麼寫的,我不斷收到此錯誤時npm install

npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. 
npm WARN @angular/[email protected] requires a peer of [email protected] but none was installed. 

,當我嘗試運行我不斷收到此錯誤的解決方案:

UNMET PEER DEPENDENCY [email protected] 

我試着將package.json改爲beta.6,但仍然失敗。

有沒有人有這方面的任何智慧? 謝謝。

回答

2
  1. 更新package.json使用"rxjs": "5.0.0-beta.6",
  2. 刪除項目文件夾中node_modules目錄。
  3. 運行npm install

這應該修復它。我用你的package.json與rxjs 5 beta6,安裝成功沒有任何問題。

相關問題