angular-threejs/angular-three

NPM package peer dependencies

nicorac opened this issue · 3 comments

I had a lot of issues installing this package (required by a third-party component...) because of the strict versions declared as peer dependencies in package.

Example: it requires @angular/router: "16.0.0", but I actually have 16.0.3 installed...

It forced me to use the --legacy-peer-deps npm option to complete the installation.

  "peerDependencies": {
    "@angular/common": "^15.1.0 || ^16.0.0",
    "@angular/core": "^15.1.0 || 16.0.0",
    "three": "^0.148.0 || ^0.149.0 || ^0.150.0 || ^0.151.0 || ^0.152.0",
    "rxjs": "7.8.0",
    "@angular/router": "16.0.0"
  },

IMHO it should read like this (added ^ prefix to @angular/core, rxjs and @angular/router versions):

  "peerDependencies": {
    "@angular/common": "^15.1.0 || ^16.0.0",
    "@angular/core": "^15.1.0 || ^16.0.0",
    "three": "^0.148.0 || ^0.149.0 || ^0.150.0 || ^0.151.0 || ^0.152.0",
    "rxjs": "^7.8.0",
    "@angular/router": "^16.0.0"
  },

I'm, having the same issue hope you'll find time to fix it because using --force or --legacy-peer-deps isn't exactly a solution

Is anyone taking care of this?
I could open a PR for it... but I see there's one waiting till 2023-05-19 🤔...