Fix peerDependencies
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.
Yes, please fix this, we also don't want to run with "--legacy-peer-deps".
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.
Alternatively, can add the following in project's package.json -
"overrides": {
"angular2gridster": {
"@angular/common": "^13.1.1",
"@angular/core": "^13.1.1"
}
}
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.