components icon indicating copy to clipboard operation
components copied to clipboard

unmet peer dependency with angular4

Open spartanPAGE opened this issue 9 years ago • 8 comments

Bug, feature request, or proposal:

A problem

What is the expected behavior?

Flawless installation

What is the current behavior?

Unmet peer dependencies with higher versions of demanded dependencies resulting in failing installation

What are the steps to reproduce?

Use these angular dependencies in package.json:

    "@angular/animations": "^4.1.3",
    "@angular/common": "^4.1.3",
    "@angular/compiler": "^4.1.3",
    "@angular/compiler-cli": "^4.1.3",
    "@angular/core": "^4.1.3",
    "@angular/forms": "^4.1.3",
    "@angular/http": "^4.1.3",
    "@angular/platform-browser": "^4.1.3",
    "@angular/platform-browser-dynamic": "^4.1.3",
    "@angular/platform-server": "^4.1.3",
    "@angular/router": "^4.1.3",

What is the use-case or motivation for changing an existing behavior?

I need to use this particular version of angular.

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

Angular 4.1.3 and the newest material

Is there anything else we should know?

http://i.imgur.com/p7u2kDI.png http://i.imgur.com/JACGk3F.png

spartanPAGE avatar Jun 26 '17 11:06 spartanPAGE

Yeah I noticed this too. I recently played with upgrading the dependencies of Angular (for development).

Upgrading the Angular dependencies of the material2-srcs package should be fine because the generated metadata files are still the same as they were with 4.0.0 (so everything stays backwards-compatible)

But for the peer dependency warning I don't really see why NPM complains about incorrect dependencies. Having the following semver expression as a peer dependency should also mean that ^4.1.3 is valid.

  • https://semver.npmjs.com/

devversion avatar Jun 26 '17 12:06 devversion

Yeah, i'm surprisied that npm complains about these versions. Is direcly modifying the material2-srcs my only option for properly working angular material?

spartanPAGE avatar Jun 26 '17 13:06 spartanPAGE

@spartanPAGE I don't think that would help in your case. You should be able to ignore the warning for now?

devversion avatar Jun 26 '17 17:06 devversion

@DevVersion I thought i could just start with new project generated by angular-cli and then migrate my codebase, yet...

+-- UNMET PEER DEPENDENCY @angular/common@^4.0.0
+-- UNMET PEER DEPENDENCY @angular/core@^4.0.0
`-- @angular/[email protected]

spartanPAGE avatar Jun 27 '17 05:06 spartanPAGE

@spartanPAGE Try wiping away your node_modules and package-lock.json. I suspect this is a problem with your environment. The package.json for the latest release lists deps at ^4.0.0, which ^4.1.3 satisfies. So either a problem with npm (old version?) or with your environment.

jelbourn avatar Jun 28 '17 00:06 jelbourn

@spartanPAGE did you find a solution? Im trying to use material2 ina ionic proyect and I have the same problem.

"dependencies": { "@angular/animations": "^4.1.3", "@angular/common": "4.1.3", "@angular/compiler": "4.1.3", "@angular/compiler-cli": "4.1.3", "@angular/core": "4.1.3", "@angular/forms": "4.1.3", "@angular/http": "4.1.3", "@angular/platform-browser": "4.1.3", "@angular/platform-browser-dynamic": "4.1.3", "@ionic-native/core": "3.12.1", "@ionic-native/splash-screen": "3.12.1", "@ionic-native/status-bar": "3.12.1", "@ionic/storage": "2.0.1", "ionic-angular": "3.6.1", "ionicons": "3.0.0", "rxjs": "5.4.0", "sw-toolbox": "3.6.0", "zone.js": "0.8.12" },

danidelgadoz avatar Sep 15 '17 07:09 danidelgadoz

@jelbourn Why did you close this? I have this issue and I don't see it resolve anywhere.

pstephenwille avatar Nov 05 '17 15:11 pstephenwille

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.