stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.28k stars 904 forks source link

"Unable to resolve package" when package/version exists #1218

Closed andrewfulrich closed 1 year ago

andrewfulrich commented 4 years ago

I'm trying to move some examples over to stackblitz but ran into this error installing @bayer/ol-kit image

Reproduction steps:

This looks similar to https://github.com/stackblitz/core/issues/286 and https://github.com/stackblitz/core/issues/175 but I don't see any malformations in the package.json at https://github.com/MonsantoCo/ol-kit/blob/v0.2.2/package.json

Why would it look for ol@~4.0 when the dependency in the package.json specifies ol@4.6.5? Wouldn't it at least look for ol@~4.6?

EricSimons commented 4 years ago

Hm, do any subdependencies of @bayer/ol-kit specify ol@~4.6? That's the most likely culprit. I can investigate this deeper but any additional info would be super helpful so I can get to the bottom of it quicker

andrewfulrich commented 4 years ago

You're right, ol@~4.0 a dependency of @terrestris/ol-util@0.5.0 which is a dependency of geostyler-openlayers-parser@0.21.0. When I install it locally, it does npm WARN that this is an unmet peer dependency: image but it works fine locally despite the warning, since the peer dependency of ol-kit itself is ol@4.6.5 and that gets installed. Is there any way for Stackblitz to ignore peer dependency warnings?

kc0tlh commented 1 year ago

@andrewfulrich, sorry for the delayed response! This issue should be resolved in our new VS Code editor! If it doesn't work out of the box, try this command: npm install --legacy-peer-deps and let us know!