2

In the image below, I can't yarn build the app.

I'm using Plaiceholder that depends on Sharp.

Everything is working fine, but when I build the app it crashes.

Versions that I'm using:

  1. "react": "17.0.2"
  2. "next": "12.1",
  3. "sharp": "^0.31.0",
  4. "@types/sharp": "^0.31.0",

enter image description here

juliomalves
  • 42,130
  • 20
  • 150
  • 146

1 Answers1

0

You're most likely on a TypeScript version that does not support the type modifier on named imports, which has been introduced in TypeScript 4.5.

Make sure you're at least on TypeScript v4.5.

yarn add typescript@4.5.5

Or better yet, try to update to the latest TypeScript version if you can.

yarn add typescript@latest
juliomalves
  • 42,130
  • 20
  • 150
  • 146