2017-02-01 26 views
0

ngブートストラップをインストールしようとしていますが、エラーが発生しましたが、それはエラーと思われます。以下は、私がpackage.jsonファイルをインストールしたときに得られるメッセージです。Angular Bootstrapインストールエラー

Dan:solomon-2 dp$ npm install --save @ng-bootstrap/ng-bootstrap 
[email protected] /Users/dp/solomon-2 
├── UNMET PEER DEPENDENCY @angular/[email protected] invalid 
├── UNMET DEPENDENCY @angular/[email protected]~2.4.0 
├── UNMET PEER DEPENDENCY @angular/[email protected] invalid 
└── @ng-bootstrap/[email protected] 

npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/[email protected]^2.3.1 but none was installed. 
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/[email protected]^2.3.1 but none was installed. 
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/[email protected]^2.3.1 but none was installed. 
npm WARN @ngtools/[email protected] requires a peer of @angular/[email protected]^2.3.1 but none was installed. 
npm WARN @ngtools/[email protected] requires a peer of @angular/[email protected]^2.3.1 but none was installed. 
npm WARN @ngtools/[email protected] requires a peer of @angular/[email protected]^2.3.1 but none was installed. 
npm WARN @ngtools/[email protected] requires a peer of @angular/[email protected]^0.5.0 but none was installed. 

{ 
    "name": "solomon-2", 
    "version": "0.0.0", 
    "license": "MIT", 
    "angular-cli": {}, 
    "scripts": { 
    "start": "ng serve", 
    "lint": "tslint \"src/**/*.ts\"", 
    "test": "ng test", 
    "pree2e": "webdriver-manager update", 
    "e2e": "protractor" 
    }, 
    "private": true, 
    "dependencies": { 
    "@angular/common": "~2.4.0", 
    "@angular/compiler": "~2.4.0", 
    "@angular/core": "~2.4.0", 
    "@angular/forms": "~2.4.0", 
    "@angular/http": "~2.4.0", 
    "@angular/platform-browser": "~2.4.0", 
    "@angular/platform-browser-dynamic": "~2.4.0", 
    "@angular/router": "~3.4.0", 
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.19", 
    "core-js": "^2.4.1", 
    "rxjs": "5.0.1", 
    "systemjs": "0.19.40", 
    "ts-helpers": "^1.1.1", 
    "zone.js": "^0.7.4" 
    }, 
    "devDependencies": { 
    "@angular/compiler": "2.4.0", 
    "@angular/compiler-cli": "2.3.1", 
    "@types/jasmine": "2.5.38", 
    "@types/node": "^6.0.42", 
    "angular-cli": "1.0.0-beta.21", 
    "codelyzer": "~1.0.0-beta.3", 
    "jasmine-core": "2.5.2", 
    "jasmine-spec-reporter": "2.5.0", 
    "karma": "1.2.0", 
    "karma-chrome-launcher": "^2.0.0", 
    "karma-cli": "^1.0.1", 
    "karma-jasmine": "^1.0.2", 
    "karma-remap-istanbul": "^0.2.1", 
    "protractor": "4.0.9", 
    "ts-node": "1.2.1", 
    "tslint": "3.13.0", 
    "typescript": "~2.0.3", 
    "webdriver-manager": "10.2.5" 
    } 
} 

答えて

1

使用angular2(@angular)ライブラリの最新バージョン。エラーメッセージには、ng2-bootatrapが必要です。@ angle/core @〜2.4.0、@ angular/common @ 2.2.1など...

1

エラーはありません。ng-bootstrap依存関係として@angular/[email protected]^2.3.1, @angular/[email protected]^2.3.1 and @angular/[email protected]^2.3.1と表示され、バージョン2.4.0がインストールされています。 Npmはバージョン管理のためにsemverを使用します。したがって、^2.3.1 !== 2.4.0

関連する問題