-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple versions of sharp in node_modules cause "Incompatible library version" error #1680
Comments
Hi Michal, good to hear from you and hope all is well. Two different versions of sharp using the same prebuilt version of libvips and its dependencies, e.g. v0.22.x and v0.22.y, should co-exist peacefully. Two different versions of sharp using different prebuilt versions of libvips and its dependencies, e.g. v0.21.x and v0.22.x, will not be able to co-exist in the same Node process (although they could live alongside each other in As you've discovered, this is due to conflicting shared library versions; whichever is The safest way to have different versions co-existing is to rely on a globally-installed libvips, but this means compiling from source at Perhaps you could move the |
I'm good! Thanks! Also thanks for very quick answer! This is pretty much what I thought (after doing some We might investigate spawning extra processes in the future (so each runtime would be safe to use whatever version), but for now we will go with adding warning/error message instructing how to fix |
Sorry I see this is closed but have just hit this problem with Gatsby running @pieh Is there a quick solution to this at all that could be shared as it seems to make it impossible/tricky to upgrade versions? :) |
I am having this issue with versions:
package.json
when i run npm run install
|
We are looking to bump
sharp
version from^0.21
to^0.22
in multiple packages we maintain at https://github.com/gatsbyjs/gatsby/, but we hit a problem when user would update just one of those packages - he would have some packages depending onsharp@^0.21
and some onsharp@^0.22
, which seems to cause issues when loading bindings:My main question is - is this something that can be fixed? Or our best bet is to add extra checks to make sure user will use packages that depend on same
sharp
version (to workaround this issue)For reference - here's PR in our repository bumping sharp version in all of our packages gatsbyjs/gatsby#13646 (where I also noted this issue)
(This is not minimal reproduction - just something I did to be able to quickly reproduce the issue)
sharp-v-mismatch
branch)yarn
/npm install
)yarn build
/npm run build
)Incompatible library version
error (see introduction of the issue)Multiple
sharp
versions nested innode_modules
link to appropriate library versions.Potentially, yes - depends on initial feedback (if this is something fixable).
This issue doesn't relate to individual images.
The text was updated successfully, but these errors were encountered: