Next.js Discord

Discord Forum

sharp.format is not a function

Unanswered
Russian Spaniel posted this in #help-forum
Open in Discord
Russian SpanielOP
Running sharp in an endpoint.

dev:  ⨯ ../node_modules/.pnpm/sharp@0.32.6/node_modules/sharp/lib/utility.js (22:21) @ format
dev:  ⨯ TypeError: sharp.format is not a function


installed version: 0.32.6
node: v18.4.0

Anyone doing the same?

1 Reply

Russian SpanielOP
Chalking this down to a pnpm issue? I needed to have sharp installed in the app package.json and in the workspace the api resides in. 🤔