2016-09-07 57 views
3

我想--save NG2的自舉Angular2:未滿足PEER DEPENDENCY

但我得到以下控制檯錯誤和警告在Angular2安裝使用NPM引導與此命令

NPM安裝

+-- UNMET PEER DEPENDENCY @angular/[email protected] 
+-- UNMET PEER DEPENDENCY @angular/[email protected] 
+-- UNMET PEER DEPENDENCY @angular/[email protected] 
+-- UNMET PEER DEPENDENCY @angular/[email protected] 
+-- [email protected] 
`-- UNMET PEER DEPENDENCY [email protected]^1.9.11 

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: [email protected] 
npm WARN [email protected] requires a peer of [email protected]^1.9.11 but none was installed. 
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed. 
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed. 
+0

您使用的角度CLI ? – Chrillewoodz

+0

是的,我正在使用Angular CLI – deen

+0

使用最新的webpack版本?測試版13我認爲這是? github上有一個關於此問題的開放性問題,您在安裝CLI時遇到未滿足的對等關係。不知道他們是否可以連接。 – Chrillewoodz

回答

2

您需要將您的應用程序升級到angular2 RC6版本。

中的package.json按照以下步驟 -

  1. 更新@angular版本2.0.0 rc.6Refer package.json here

  2. 清潔你的node_modules文件夾,然後運行NPM安裝。

看看是否有幫助。


編輯:

這是我的package.json怎麼看起來像angular2 RC6和NG2的自舉1.1.1角CLI

{ 
    "name": "angular2-rc6-cli-ng2bootstrap-8-sep", 
    "version": "0.0.0", 
    "license": "MIT", 
    "angular-cli": {}, 
    "scripts": { 
    "start": "ng serve", 
    "postinstall": "typings install", 
    "lint": "tslint \"src/**/*.ts\"", 
    "test": "ng test", 
    "pree2e": "webdriver-manager update", 
    "e2e": "protractor" 
    }, 
    "private": true, 
    "dependencies": { 
    "@angular/common": "2.0.0-rc.6", 
    "@angular/compiler": "2.0.0-rc.6", 
    "@angular/compiler-cli": "0.6.0", 
    "@angular/core": "2.0.0-rc.6", 
    "@angular/forms": "2.0.0-rc.6", 
    "@angular/http": "2.0.0-rc.6", 
    "@angular/platform-browser": "2.0.0-rc.6", 
    "@angular/platform-browser-dynamic": "2.0.0-rc.6", 
    "@angular/platform-server": "2.0.0-rc.6", 
    "@angular/router": "3.0.0-rc.2", 
    "@angular/upgrade": "2.0.0-rc.6", 
    "es6-shim": "0.35.1", 
    "ng2-bootstrap": "^1.1.1", 
    "reflect-metadata": "0.1.3", 
    "rxjs": "5.0.0-beta.11", 
    "systemjs": "0.19.26", 
    "zone.js": "^0.6.17" 
    }, 
    "devDependencies": { 
    "angular-cli": "1.0.0-beta.10", 
    "codelyzer": "0.0.20", 
    "ember-cli-inject-live-reload": "1.4.0", 
    "jasmine-core": "2.4.1", 
    "jasmine-spec-reporter": "2.5.0", 
    "karma": "0.13.22", 
    "karma-chrome-launcher": "0.2.3", 
    "karma-jasmine": "0.3.8", 
    "protractor": "3.3.0", 
    "ts-node": "0.5.5", 
    "tslint": "3.11.0", 
    "typescript": "2.0.2", 
    "typings": "1.3.1" 
    } 
} 
+0

thanx for response,現在我得到** UNMET PEER DEPENDENCY @ angular/platform-server @^2.0.0-rc.6 ** – deen

+0

相同,是否有解決方案? – h345k34cr

+0

@ h345k34cr從我的編輯答案中檢查package.json。 – Sanket

相關問題