I needed to use bootstrap with angular2 so when I ran the command

297 Views Asked by At

I needed to use bootstrap with angular2 so when I ran the command

$ npm install --save @ng-bootstrap/ng-bootstrap

I had this:

 [email protected]    C:\Users\alaaeddine\Downloads\Compressed\app3\angular2-seed
 +-- UNMET PEER DEPENDENCY @angular/common@^2.0.0
 +-- UNMET PEER DEPENDENCY @angular/core@^2.0.0
 +-- UNMET PEER DEPENDENCY @angular/forms@^2.0.0
`    -- @ng-bootstrap/[email protected]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0  (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/common@^2.0.0 but none was installed.
npm WARN @ng-bootstrap/[email protected] requires a peer of @angular/forms@^2.0.0 but none was installed.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
1

There are 1 best solutions below

2
On

Edit your package.json to have following versions:

 "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"

    // might want to update this ones as to match actual github version of angular quickstart
    "angular-in-memory-web-api": "~0.2.4",
    "systemjs": "0.19.40",
    "core-js": "^2.4.1",
    "rxjs": "5.0.1",
    "zone.js": "^0.7.4"

Tnen npm install and you should be fine

If you are just begining with your project I recomend pulling the changes from the repo