Next.js Discord

Discord Forum

Next 15.1 local build: Module "Sharp" not found

Unanswered
Wesley Janse posted this in #help-forum
Open in Discord
Avatar
After upgraden to Next 15.1 and React 19 I get the following error during Next Build

Module sharp not found. Please run npm install --cpu=wasm32 sharp to install it.

How should I go around this?

6 Replies

Avatar
well it said "Please run npm install --cpu=wasm32 sharp to install it."...
Avatar
Yes i understand that, I tried that but that didn't solve it. do I have to install it globally?
Avatar
No don’t install it globally.

After installing it locally, what is the package.json file content?
Avatar
Mini Satin
So you need to use sharp client side ? I need a solution as well
Avatar
Mini Satin
@Wesley Janse Did you seen that ?
Image
Avatar
no, OP is not trying to use in the browser. OP is using next/image but the architecture on which the server is run does not support sharp natively, though npm install --cpu=wasm32 sharp will install the slower wasm build of sharp to that server so that next/image still works