1

我正在尝试在 cloud9 上安装 node/angular2 解决方案。这是我的 package.json

{
  "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/http@2.0.0-rc.5 requires a peer of rxjs@5.0.0-beta.6 but none was installed.
npm WARN @angular/router@3.0.0-rc.1 requires a peer of rxjs@5.0.0-beta.6 but none was installed.
npm WARN @angular/core@2.0.0-rc.5 requires a peer of rxjs@5.0.0-beta.6 but none was installed.

当我尝试运行解决方案时,我不断收到此错误:

 UNMET PEER DEPENDENCY rxjs@5.0.0-beta.11

我尝试将 package.json 更改为 beta.6,但仍然失败。

有人对此有任何智慧吗?谢谢。

4

1 回答 1

3
  1. 更新package.json使用"rxjs": "5.0.0-beta.6",
  2. 删除node_modules项目文件夹中的目录。
  3. npm install

那应该解决它。我用你package.json的 rxjs 5 beta6,安装成功,没有任何问题。

于 2016-09-01T01:48:31.983 回答