angular2gridster icon indicating copy to clipboard operation
angular2gridster copied to clipboard

Fix peerDependencies

Open WolfspiritM opened this issue 3 years ago • 4 comments

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: [email protected]
npm ERR! Found: @angular/[email protected]
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 [email protected]
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.

WolfspiritM avatar May 18 '22 23:05 WolfspiritM

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

L-X-T avatar Jun 10 '22 12:06 L-X-T

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.

ramijebara avatar Jun 13 '22 19:06 ramijebara

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

"overrides": {
    "angular2gridster": {
      "@angular/common": "^13.1.1",
      "@angular/core": "^13.1.1"
    }
  }

softengi avatar Oct 06 '22 09:10 softengi

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.

ramijebara avatar Oct 06 '22 16:10 ramijebara