Closed keegandonley closed 4 years ago
Hi, thanks for the report! The mentioned link should now be available
The doc should be updated as sharp is installed by default, seemingly the installation failed on your device though 🤔
Thanks @timneutkens! Yeah this was kind of a weird case for me. The XCode command line tools seemed corrupted or partially missing so building and installing sharp failed until I removed them and re-installed.
Had the same error on Mac:
{ Error: Cannot find module 'sharp'
Learn more: https://err.sh/next.js/install-sharp
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at imageOptimizer (...../app/node_modules/next/dist/next-server/server/image-optimizer.js:4:7)
at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
Tried to uninstall and re-install XCode command line tools but that didn't work.
Tried to fix it with the upcoming updated doc here, and option 1 worked!
I was using node v10.13.0, so I did this to update to latest stable version (currently v14.15.0).
Then after a npm i sharp
, the error was gone   🎉.
This happens because you are using a wrong Node version. Check your warnings when building the app.
In my case I got the following:
sharp@0.26.2: The engine "node" is incompatible with this module. Expected version ">=10.16.0"
Use NVM to add a new version.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Bug report
Describe the bug
The err.sh link given by Next 10 goes to a 404:
https://err.sh/next.js/install-sharp
links tohttps://github.com/vercel/next.js/blob/master/errors/install-sharp.md
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
This link should link to the correct document
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
Add any other context about the problem here.