Skip to content
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' #56607

Closed
1 task done
testerez opened this issue Oct 9, 2023 · 4 comments
Closed
1 task done

Cannot find module 'sharp' #56607

testerez opened this issue Oct 9, 2023 · 4 comments
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked

Comments

@testerez
Copy link

testerez commented Oct 9, 2023

Link to the code that reproduces this issue

https://github.com/testerez/test-next-sharp-import-error

To Reproduce

  1. deploy the project to Vercel
  2. open deployed app and notice that the image is not loading
  3. check Vercel Logs to see the error.

Current vs. Expected behavior

When updating nextjs from v13.5.3 to v13.5.4 I started getting this error once deployed on Vercel:

Error: Cannot find module 'sharp'

I'm using sharp to resize images and it was woking well before this minor next update. It's also working locally with no issue. I created a minimal repo to reproduce the error. You can test it locally, it should work and display a red image. But once deployed to Vercel, you should get the error.

Verify canary release

  • I verified that the issue exists in the latest Next.js 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: 18.15.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.8.0
Relevant Packages:
  next: 13.5.4
  eslint-config-next: 13.5.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Additional context

No response

NEXT-1674

@testerez testerez added the bug Issue was opened via the bug report template. label Oct 9, 2023
@balazsorban44 balazsorban44 added the linear: next Confirmed issue that is tracked by the Next.js team. label Oct 9, 2023
@balazsorban44
Copy link
Member

balazsorban44 commented Oct 9, 2023

This seems to be a regression but we are aware: https://github.com/vercel/next.js/pull/56048/files#r1349165267

Related: #56357

We will have a look, thanks!

@mozzius
Copy link

mozzius commented Oct 16, 2023

Appears to be working in next@13.5.5

@huozhi
Copy link
Member

huozhi commented Oct 16, 2023

Closed as fixed. Releated tracing fixes: #56674, please upgrade to 13.5.5

@huozhi huozhi closed this as completed Oct 16, 2023
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team. locked
Projects
None yet
Development

No branches or pull requests

4 participants