components icon indicating copy to clipboard operation
components copied to clipboard

UNMET PEER DEPENDENCY on installing @angular/material

Open drasko opened this issue 10 years ago • 13 comments

Bug, feature request, or proposal:

Can not install Material 2

What is the current behavior?

drasko@Lenin:~/mainflux/dashflux$ npm install --save @angular/material
[email protected] /home/drasko/mainflux/dashflux
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├─┬ @angular/[email protected] 
│ └── @types/[email protected] 
└── UNMET PEER DEPENDENCY @angular/[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":"linux","arch":"x64"})
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
drasko@Lenin:~/mainflux/dashflux$

Which versions of Angular, Material, OS, browsers are affected?

drasko@Lenin:~/mainflux/dashflux$ uname -a
Linux Lenin 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux
drasko@Lenin:~/mainflux/dashflux$ node --version
v6.8.1
drasko@Lenin:~/mainflux/dashflux$ ng --version
Looks like you have a different program called watchman, falling back to NodeWatcher.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.17
node: 6.8.1
os: linux x64

drasko avatar Oct 16 '16 02:10 drasko

It looks like you're mixing versions, @drasko; here are the relevant portions of my package.json which is running Angular 2.1.0 with Angular Material 2.0.0-alpha.9-3 successfully in a Angular CLI 1.0.0-beta.17 based project:

  "dependencies": {
    "@angular/common": "2.1.0",
    "@angular/compiler": "2.1.0",
    "@angular/core": "2.1.0",
    "@angular/forms": "2.1.0",
    "@angular/http": "2.1.0",
    "@angular/platform-browser": "2.1.0",
    "@angular/platform-browser-dynamic": "2.1.0",
    "@angular/router": "3.1.0",
    "@angular/material": "2.0.0-alpha.9-3",
    "core-js": "^2.4.1",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.23"
  },
  "devDependencies": {
    "@types/jasmine": "^2.2.30",
    "@types/node": "^6.0.42",
    "hammerjs": "2.0.8",
    "angular-cli": "1.0.0-beta.17",
    "codelyzer": "~0.0.26",
    "jasmine-core": "2.4.1",
    "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"
  }

JanStureNielsen avatar Oct 16 '16 03:10 JanStureNielsen

package.json was generated with angular-cli.

drasko@Lenin:~/mainflux/dashflux$ cat package.json 
{
  "name": "dashflux",
  "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.0.0",
    "@angular/compiler": "~2.0.0",
    "@angular/core": "~2.0.0",
    "@angular/forms": "~2.0.0",
    "@angular/http": "~2.0.0",
    "@angular/material": "^2.0.0-alpha.9-3",
    "@angular/platform-browser": "~2.0.0",
    "@angular/platform-browser-dynamic": "~2.0.0",
    "@angular/router": "~3.0.0",
    "core-js": "^2.4.1",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.23"
  },
  "devDependencies": {
    "@types/jasmine": "^2.2.30",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.17",
    "codelyzer": "~0.0.26",
    "jasmine-core": "2.4.1",
    "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.2"
  }
}

And then I did npm install --save @angular/material

Is this a bug in angular-cli?

drasko avatar Oct 16 '16 18:10 drasko

I think this is an angular-cli bug #2692

keyduq avatar Oct 16 '16 18:10 keyduq

@JanStureNielsen trying package.json you proposed, I am still getting the errors:

drasko@Lenin:~/mainflux/dashflux$ npm install --save @angular/material
[email protected] /home/drasko/mainflux/dashflux
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
└── @angular/[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":"linux","arch":"x64"})
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN @ngtools/[email protected] requires a peer of [email protected] but none was installed.

drasko avatar Oct 16 '16 19:10 drasko

Try using the same package.json from this sample app: https://github.com/angular/material2

In that, I don't get any unmet peer deps for material itself, just for compiler-cli (which is unrelated to material). In general, though, you can ignore the unmet peer dependencies.

jelbourn avatar Oct 18 '16 23:10 jelbourn

After updating to [email protected] and @angular/[email protected] I don't get anymore "unmet peer dependency" messages.

pliski avatar Oct 25 '16 03:10 pliski

same issue :

➜  testing git:(master) npm install --save @angular/material
[email protected] /home/elyas/programming/js/testing
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
└── @angular/[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":"linux","arch":"x64"})
npm WARN @angular/[email protected] requires a peer of @angular/core@^2.3.0 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/common@^2.3.0 but none was installed.
npm WARN @angular/[email protected] requires a peer of @angular/http@^2.3.0 but none was installed.

@angular/cli: 1.0.0 node: 6.10.0 os: linux x64

elyas74 avatar Mar 31 '17 19:03 elyas74

same issue as @elyas74

JordyBaylac avatar Apr 06 '17 21:04 JordyBaylac

@elyas74 @JordyBaylac

  • Install from master:
    npm install --save https://github.com/angular/material2-builds.git
    
  • ~Alternatively, you can wait for the next release to come out.~ Update: You can now install from 2.0.0-beta.3:
    npm install --save @angular/material@latest
    

EdricChan03 avatar Apr 07 '17 01:04 EdricChan03

hi

maybe i have the same issue

npm install --save https://github.com/angular/material2-builds.git [email protected] /storage/cmora/Solucionet/proyectos/angular/angularDemo ├── UNMET PEER DEPENDENCY @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/[email protected] ├── UNMET PEER DEPENDENCY @angular/[email protected] └── @angular/[email protected] (git+https://github.com/angular/material2-builds.git#03dd33fbfdc7948c7da7d4676b0ed4ec7e081c47)

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":"linux","arch":"x64"}) npm WARN @angular/[email protected] requires a peer of @angular/core@^4.0.0 but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/common@^4.0.0 but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/core@^4.0.0 but none was installed. npm WARN @angular/[email protected] requires a peer of @angular/common@^4.0.0 but none was installed.

angular-cli: 1.0.0-beta.28.3 node: 6.11.1 os: linux x641.1

carlosmoradev avatar Jul 16 '17 08:07 carlosmoradev

@cmmora What do you expect when you're using an older version! From a certain version, it requires angular 4 and above, which explains the error as shown above. Thus, try running npm outdated in your console to update all your app's dependencies.

EdricChan03 avatar Jul 16 '17 12:07 EdricChan03

solved for me with installing the 6.4.7 version npm install @angular/[email protected] --save

Saifeddine-Rjab avatar Sep 27 '18 09:09 Saifeddine-Rjab

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.