christopherthielen / check-peer-dependencies

Checks peer dependencies of the current NodeJS package. Offers solutions for any that are unmet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to resolve terser

wawyed opened this issue · comments

Hi @christopherthielen just trying to update uirouter angular hybrid to latest but I'm having problems with this dependency:

$ yarn upgrade terser@5.30.3
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ terser@5.30.3
info All dependencies
├─ @jridgewell/resolve-uri@3.1.2
└─ terser@5.30.3

Found 1 new unmet peerDependencies...
❌ terser ^5.4.0 is required by vite@5.1.5) OPTIONAL (1.0.0 is installed)

Not sure why it thinks 1.0.0 is installed when it's installed 5.30.0 which should be higher than 5.4.0. I'm wondering if there's something amiss with the way it's checking the dependency version?

You can see the failing build here:

ui-router/angular-hybrid#595

Having a further look at this package. It looks like the package has the following structure:

image

Which contains two package.json:

image

The one within dist is meant to be ignored in favour of the one at the top level.

But it doesn't seem to be the case.