0

I am trying to install ng bootstrap but am getting an error which seems itself to be an error. The following is the message I get when I run the install, below is my package.json file.

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/core@~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/core@^2.3.1 but none was installed.
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/common@^2.3.1 but none was installed.
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/forms@^2.3.1 but none was installed.
npm WARN @ngtools/[email protected] requires a peer of @angular/compiler@^2.3.1 but none was installed.
npm WARN @ngtools/[email protected] requires a peer of @angular/compiler-cli@^2.3.1 but none was installed.
npm WARN @ngtools/[email protected] requires a peer of @angular/core@^2.3.1 but none was installed.
npm WARN @ngtools/[email protected] requires a peer of @angular/tsc-wrapped@^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"
  }
}

2 Answers 2

1

Use latest version of angular2 (@angular) libraries. Error messages shows ng2-bootatrap required @angular/core@~2.4.0 ,@angular/[email protected] etc...

Sign up to request clarification or add additional context in comments.

Comments

1

There's no error, just a few warnings about unmet peer dependencies due to ng-bootstrap listed @angular/core@^2.3.1, @angular/common@^2.3.1 and @angular/forms@^2.3.1 as a dependency and you have version 2.4.0 installed. Npm uses semver for versioning therefore ^2.3.1 !== 2.4.0.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.