I am trying to push my code to Vercel, it fails in the build steps when checking the validity of the types.
This is the full error received:
info - Checking validity of types...
Failed to compile.
./node_modules/next/dist/client/image.d.ts:19:14
Type error: Cannot find name 'StaticImageData'.
I tried rolling back the Next.js version to 11, which didn’t work.
Edit:
I found this similar Github issue however it doesn’t seem to have been much help.
import { StaticImageData } from "next/image"