@ angular / core @ 2.0.0-rc.1包不能满足其兄弟姐妹的需要。 peerDependencies要求!'

时间:2016-07-14 13:03:34

标签: android angularjs npm

所以我正在设置这个开源app

当我运行tns run android --emulator它给了我这个错误:

Unable to install dependencies. Make sure your package.json is valid and all dependencies are correct. Error is: The package @angular/core@2.0.0-rc.1 does not satisfy its siblings' peerDependencies requirements!
Analytics statuses: 
{ TrackFeatureUsage: 1, TrackExceptions: 1 }
Trying to track exception with message 'Unable to install dependencies. Make sure your package.json is valid and all dependencies are correct. Error is: The package @angular/core@2.0.0-rc.1 does not satisfy its siblings' peerDependencies requirements!'.

但是如果我检查一个日志文件,那么对等依赖项是:

  code: 'EPEERINVALID',
  packageName: '@angular/core',
  packageVersion: '2.0.0-rc.1',
  peersDepending: 
   { '@angular/common@2.0.0-rc.1': '2.0.0-rc.1',
     '@angular/compiler@2.0.0-rc.1': '2.0.0-rc.1',
     '@angular/http@2.0.0-rc.4': '^2.0.0-rc.4',
     '@angular/platform-browser@2.0.0-rc.1': '2.0.0-rc.1',
     '@angular/platform-browser-dynamic@2.0.0-rc.1': '2.0.0-rc.1',
     '@angular/platform-server@2.0.0-rc.1': '2.0.0-rc.1',
     '@angular/router-deprecated@2.0.0-rc.2': '^2.0.0-rc' } }

我的package.json文件:

  1 {
  2   "description": "NativeScript Application",
  3   "license": "SEE LICENSE IN <your-license-filename>",
  4   "readme": "NativeScript Application",
  5   "repository": "<fill-your-repository-here>",
  6   "nativescript": {
  7     "id": "org.nativescript.mobile",
  8     "tns-ios": {
  9       "version": "2.0.1"
 10     },
 11     "tns-android": {
 12       "version": "2.0.0"
 13     }
 14   },
 15   "dependencies": {
 16     "@angular/core": "2.0.0-rc.1",
 17 
 18     "@angular/common": "2.0.0-rc.1",
 19     "@angular/compiler": "2.0.0-rc.1",
 20     "@angular/http": "^2.0.0-rc.4",
 21     "@angular/platform-browser": "2.0.0-rc.1",
 22     "@angular/platform-browser-dynamic": "2.0.0-rc.1",
 23     "@angular/platform-server": "2.0.0-rc.1",
 24     "@angular/router-deprecated": "^2.0.0-rc",
 25 
 26     "nativescript-angular": "0.1.1",
 27     "nativescript-pulltorefresh": "^1.1.4",
 28     "nativescript-socket.io": "^0.1.6",
 29     "tns-core-modules": "^2.0.0"
 30   },
 31   "devDependencies": {
 32     "babel-traverse": "6.9.0",
 33     "babel-types": "6.9.1",
 34     "babylon": "6.8.0",
 35     "filewalker": "0.1.2",
 36     "lazy": "1.0.11",
 37     "nativescript-dev-typescript": "^0.3.2",
 38     "typescript": "^1.8.10"
 39   }
 40 }

任何想法如何解决这个问题?我现在已经把这个问题打了几个小时,会给你一些帮助。

现在只填写文本,因此堆栈溢出让我发布此问题。

1 个答案:

答案 0 :(得分:1)

通过更新package.json文件解决。

从@angular版本中删除^字符。