-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Cannot find module 'sharp' #59516
Comments
want to contribute |
Can confirm this is happening for us, too, and causes issues with ISR (though not on every page). Downgrading sharp to Our overall issue must have something to do with next/image, because we didn't have sharp installed but were seeing issues with ISR. A little digging pointed me to a similar issue to this, so we installed the latest version of sharp but saw no improvement in our problem. Downgrading finally fixed it. |
Can confirm on v14.1. Running a standalone build in prod. Getting:
No error after downgrading sharp to the above recommended version |
Likewise, after upgrading sharp to
Following those docs didn't solve the issue. Adding the path to the sharp package in node_modules to our ENV didn't fix. Have reverted to |
I'm having the same issue |
Works on |
This might be related: lovell/sharp#3994 When using yarn 1, |
For people using an old version of Sharp, can you try it again? The Vercel team have fixed stuff that were preventing newer versions of sharp from working. I just deployed a project using |
This issue is that your repo has both If you delete |
I use only pnpm-lock.yaml and have the same issue with the official dockerfile https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile |
@rusakovic There was another issue with pnpm specifically that was fixed in |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/testerez/test-next-sharp-import-error
To Reproduce
Current vs. Expected behavior
I already had a similar issue reported here: #56607
That was fixed but I'm now having the same issue again when updating sharp from
0.32.6
to0.33.0
. The issue happens only once the app is deployed to Vercel: https://test-next-sharp-import-error-bifv4sp30-testerez.vercel.app/Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 Binaries: Node: 20.10.0 npm: 10.2.3 Yarn: 1.22.19 pnpm: 8.12.0 Relevant Packages: next: 14.0.4 eslint-config-next: 14.0.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.3.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response
The text was updated successfully, but these errors were encountered: