swiety85 / angular2gridster

Angular implementation of well known Gridster (no jQuery, no external libraries, only Angular and Rx.js).
https://swiety85.github.io/angular2gridster/
MIT License
203 stars 75 forks source link

Fix peerDependencies #411

Open WolfspiritM opened 2 years ago

WolfspiritM commented 2 years ago

After updating angular and trying to recreate the package-lock with npm >= 7 I get an error cause of peerDependencies:

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app@1.2.3
npm ERR! Found: @angular/common@13.3.7
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"13.3.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"13.1.1" from angular2gridster@13.0.0
npm ERR! node_modules/angular2gridster
npm ERR!   angular2gridster@"^13.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Using --legacy-peer-deps works but in my opinion angular2gridster should not have a fixed dependency to 13.1.1 but ^13.1.1 instead.

L-X-T commented 2 years ago

Yes, please fix this, we also don't want to run with "--legacy-peer-deps".

ramijebara commented 2 years ago

We are seeing this issue as well. Angular 13.3.X, NPM 8.12.1 and NodeJS LTS 16.15.1. Using npm ci --force is a workaround until the root cause is resolved.

softengi commented 2 years ago

Alternatively, can add the following in project's package.json -

"overrides": {
    "angular2gridster": {
      "@angular/common": "^13.1.1",
      "@angular/core": "^13.1.1"
    }
  }
ramijebara commented 2 years ago

We have a forked copy of this repo now that we have since updated to Angular 14.

https://github.com/HyperviewHQ/angular2gridster if anyone is interested.

There is also an open PR to port over the changes to this repo.

I hope you find it useful.