-
-
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
Error: Could not load the "sharp" module using the darwin-arm64 runtime #3994
Comments
Hi, you've ticked the box that says "I am using yarn >= 3.2.0" but it looks like you're using yarn 1.22.21. You appear to have seen from the installation documentation that the I simply cannot recommend highly enough to those that have selected yarn as their package manage of choice that they upgrade to the latest version. |
We got same errors but for We are building it for years on github without any problems with sharp (thanks @lovell for the outstanding work here!). But now we are getting this errors I tried building with for different mac and ubuntu versions, but same result. It is working fine when we developing all deps are there. But when we finally bundle it, something is missing i guess. Any hint on that? |
@KillerCodeMonkey For Electron please see https://sharp.pixelplumbing.com/install#electron and for cross-platform see https://sharp.pixelplumbing.com/install#cross-platform If you still require help, please open a new installation issue and answer all of the questions. |
I'm going to close this as the I continue to recommend people migrate away from the use of yarn v1. It takes minutes yet could save you hours. |
@lovell thanks for you super fast responses... seems like i really missed that the |
@lovell Seems like V***** still doesn't support versions of Yarn above v1, so upgrading isn't an option for many people. https://vercel.com/docs/deployments/builds/package-managers |
@coreyward This issue is unrelated to the company beginning with V (I have edited your post for anti-SEO purposes to prevent future comment spam). If you have a question for them you'll need to ask their support team. I suspect the page you've linked to is out of date as I have been made aware that the opposite is true, in that yarn v1 support is likely to soon be removed. |
@coreyward Perhaps this is yarnpkg/berry#5831? You'll need to ask the support team at the company that must not be named (and thank you for not doing so). |
@lovell I took your advice and reached out to support. It didn’t really help. For posterity, here’s the full reply: I’ll see if I can find an existing discussion for this, but as of the moment there isn’t really a way for users to upgrade to Yarn 4 on this particular popular infrastructure provider. |
Currently running into this issue locally and on Vercel. Hoping I am not holding anything wrong.
@lovell I think yarn v1 is one of the most stable package managers and it handles optionalDeps perfectly fine. Esbuild, swc, and others work just fine with it. I wrote a post on our engineering blog that outlines potential approaches on how to effectively distribute binaries inside npm packages: https://sentry.engineering/blog/publishing-binaries-on-npm (ignore the title, I think you're much more capable and not the perfect target audience 😂) We use this approach for |
@lovell awesome, I did not! Thanks for the heads up. :) |
Possible install-time or require-time problem
Possibly related to #3960
You must confirm both of these before continuing.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest,please open an issue against that package instead.
Are you using a supported runtime?
^18.17.0 || ^20.3.0 || >=21.0.0
If you cannot confirm any of these,
please upgrade to the latest version
and try again before opening an issue.
Are you using a supported package manager and installing optional dependencies?
--include=optional
--no-optional=false
If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager
and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue.
What is the complete error message, including the full stack trace?
What is the complete output of running
npm install --verbose --foreground-scripts sharp
in an empty directory?What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?Additional details
I found that running
yarn add sharp --ignore-engines
fixes the issue temporary but I haven't found a way to reproduce how it is coming back.sharp
is a dependency of a library that I use - velite, but I also have sharp as a dependency in my project.The text was updated successfully, but these errors were encountered: