You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vercel only: 0.33.0: error Could not load the "sharp" module using the linux-x64 runtime #3870
Do you only see this problem on Vercel? If so, please can you contact their support team. If not, please can you provide answers to the questions in the installation issue template.
I'm pretty sure it's just that the new version has stricter OS/cpu requirements and likely that the installs that's we're used to using aren't adding the correct binaries. Still haven't figured out how to install the correct ones yet though 😵
I'm also getting this on my local Linux machine while trying to upgrade vite-imagetools to the latest sharp. It installs fine, but then fails at runtime when I run pnpm test:
Error: Could not load the "sharp" module using the linux-x64 runtime
Possible solutions:
- Add platform-specific dependencies:
npm install --os=linux --cpu=x64 sharp
or
npm install --force @img/sharp-linux-x64
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
changed the title [-]0.33.0: Vercel error: Could not load the "sharp" module using the linux-x64 runtime[/-][+]0.33.0: error: Could not load the "sharp" module using the linux-x64 runtime[/+]on Nov 29, 2023
changed the title [-]0.33.0: error: Could not load the "sharp" module using the linux-x64 runtime[/-][+]0.33.0: error Could not load the "sharp" module using the linux-x64 runtime[/+]on Nov 29, 2023
Facing same issue on Vercel.
Confirmed that my Vercel and local env are running node version = 18.17.1
I have already install sharp by npm install --force @img/sharp-linux-x64
When I run locally on a Linux machine (ArchLinux x64) it works fine both on build and runtime;
while on Vercel build success but the serverless function call throw the following exception at runtime:
⨯ Error: Could not load the "sharp" module using the linux-x64 runtime
Possible solutions:
- Add platform-specific dependencies:
npm install --os=linux --cpu=x64 sharp
or
npm install --force @img/sharp-linux-x64
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/var/task/node_modules/sharp/lib/sharp.js:85:9)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at r.<computed>.e._load (/var/task/___vc/__launcher/__launcher.js:14:2299)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at w.require (/var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:11:25815)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:10:1) {
page: '/api/og'
}
update:
downgrade to 0.32.6 works (fyi who really need a workaround)
Reacted by Jack Clackett, Patrick Brouwer, septem1997, Bastien PELLETIER GARNIER, Vladimir Iglovikov, (,,゚Д゚), Jimpex, Pankaj Goyal, ufukomer and Vlad Vasilov
If everything works locally and you're seeing this problem only on Vercel, please contact Vercel support.
If you're seeing this problem locally, please open a new installation issue and answer all the questions. This will help me to gather lots of information from as many people as possible before starting to look for patterns.
I'm having this and I'm not using Vercel. Can it be because of an npm-shrinkwrap.json created on a MacOS and later on, on Github, the image of my app installs dependencies on a linux?
I'm going to temporarily lock this issue as it relates only and specifically to a problem with Vercel that is being tracked at vercel/nft#371 - please subscribe to that issue and/or contact Vercel support for updates.
For anyone else coming here, please open a new installation issue and answer all the questions. I need your answers to these questions as a minimum starting point to be able to try to help you.
Repository owner locked and limited conversation to collaborators on Dec 5, 2023
Repository owner unlocked this conversation on Jan 3, 2024
The vercel/nft#371 issue has now been fixed. If you are deploying to Vercel (or using Next.js standalone mode) please ensure you upgrade your dependencies to use @vercel/nft version 0.26.1 or later.
For anyone else coming here experiencing similar symptoms, please open a new installation issue and answer all the questions.
As a quick fix for now you could install an older version of sharp manually in your app. I tried with [email protected] and it should remove the error from Vercel.
@JClackett I think Vercel uses @vercel/nft under the hood so perhaps they have not yet updated their build infrastructure with the latest version. You'll need to ask Vercel support about this.
There was a problem affecting both Next.js standalone mode and Vercel deployments, which has now been fixed - please ensure @vercel/nft version 0.26.1 or later is being used - see vercel/nft#371 for details.
Lots of people are running into npm/cli#4828 and the symptoms are similar so please check that one first if you're sharing lockfiles between multiple platforms.
If you're still having problems, please open a new installation issue and answer all the questions. I need your answers to these questions as a minimum starting point to be able to try to help you.
I'm going to lock this issue again.
Repository owner locked and limited conversation to collaborators on Jan 10, 2024
Activity
lovell commentedon Nov 29, 2023
Do you only see this problem on Vercel? If so, please can you contact their support team. If not, please can you provide answers to the questions in the installation issue template.
c100k commentedon Nov 29, 2023
lovell commentedon Nov 29, 2023
@c100k Please open a new installation issue and answer all of the questions.
bhr commentedon Nov 29, 2023
SeongwoonHong commentedon Nov 29, 2023
JClackett commentedon Nov 29, 2023
I'm pretty sure it's just that the new version has stricter OS/cpu requirements and likely that the installs that's we're used to using aren't adding the correct binaries. Still haven't figured out how to install the correct ones yet though 😵
benmccann commentedon Nov 29, 2023
I'm also getting this on my local Linux machine while trying to upgrade
vite-imagetoolsto the latestsharp. It installs fine, but then fails at runtime when I runpnpm test:[-]0.33.0: Vercel error: Could not load the "sharp" module using the linux-x64 runtime[/-][+]0.33.0: error: Could not load the "sharp" module using the linux-x64 runtime[/+][-]0.33.0: error: Could not load the "sharp" module using the linux-x64 runtime[/-][+]0.33.0: error Could not load the "sharp" module using the linux-x64 runtime[/+]sawaYch commentedon Nov 30, 2023
Facing same issue on Vercel.
Confirmed that my Vercel and local env are running node version =
18.17.1I have already install
sharpbynpm install --force @img/sharp-linux-x64When I run locally on a Linux machine (ArchLinux x64) it works fine both on build and runtime;
while on Vercel build success but the serverless function call throw the following exception at runtime:
update:
downgrade to
0.32.6works (fyi who really need a workaround)lovell commentedon Nov 30, 2023
If everything works locally and you're seeing this problem only on Vercel, please contact Vercel support.
If you're seeing this problem locally, please open a new installation issue and answer all the questions. This will help me to gather lots of information from as many people as possible before starting to look for patterns.
dresende commentedon Nov 30, 2023
I'm having this and I'm not using Vercel. Can it be because of an
npm-shrinkwrap.jsoncreated on a MacOS and later on, on Github, the image of my app installs dependencies on a linux?28 remaining items
kbourro commentedon Dec 5, 2023
lovell commentedon Dec 5, 2023
I'm going to temporarily lock this issue as it relates only and specifically to a problem with Vercel that is being tracked at vercel/nft#371 - please subscribe to that issue and/or contact Vercel support for updates.
For anyone else coming here, please open a new installation issue and answer all the questions. I need your answers to these questions as a minimum starting point to be able to try to help you.
lovell commentedon Jan 3, 2024
The vercel/nft#371 issue has now been fixed. If you are deploying to Vercel (or using Next.js standalone mode) please ensure you upgrade your dependencies to use
@vercel/nftversion 0.26.1 or later.For anyone else coming here experiencing similar symptoms, please open a new installation issue and answer all the questions.
hewar-saber commentedon Jan 4, 2024
[email protected]
This worked for me, I had the same issue with Next.js on Vercel and Netlify.
JClackett commentedon Jan 4, 2024
I wasn't using @vercel/nft, and its still error in vercel for me using latest versions
lovell commentedon Jan 5, 2024
@JClackett I think Vercel uses
@vercel/nftunder the hood so perhaps they have not yet updated their build infrastructure with the latest version. You'll need to ask Vercel support about this.slavanossar commentedon Jan 8, 2024
Was also experiencing this issue and updating Node fixed it (
18.16.1>18.19.0).aoioioi commentedon Jan 9, 2024
Not working for me deployed on render. Using node 18.19.0. Rolling back to 0.32.6 fixed the issue for me
dalyr95 commentedon Jan 10, 2024
Same issue on AWS, not vercel. Node 18.17.0 - x64, 0.32.6 rollback works
lovell commentedon Jan 10, 2024
There was a problem affecting both Next.js standalone mode and Vercel deployments, which has now been fixed - please ensure
@vercel/nftversion 0.26.1 or later is being used - see vercel/nft#371 for details.Lots of people are running into npm/cli#4828 and the symptoms are similar so please check that one first if you're sharing lockfiles between multiple platforms.
If you're still having problems, please open a new installation issue and answer all the questions. I need your answers to these questions as a minimum starting point to be able to try to help you.
I'm going to lock this issue again.
add @vercel/nft >0.26.1 to fix lovell/sharp#3870