Failed to compile. Entry point for implicit type library 'mime'

I suddenly started getting this error message when trying to compile. The dev server works fine. I tried installing @types/mime and including "types": ["node"] in my tsconfig.json/compileOptions. The same error message appears on Vercel as well, so it's nothing about my setup. I suspected it could be caused by some JSON imports, so I appended with { type: 'json' } to my imports.
$ next build
▲ Next.js 14.1.4
- Environments: .env

Linting and checking validity of types .Failed to compile.

Type error: Cannot find type definition file for 'mime'.
The file is in the program because:
Entry point for implicit type library 'mime'

error: script "build" exited with code 1
$ next build
▲ Next.js 14.1.4
- Environments: .env

Linting and checking validity of types .Failed to compile.

Type error: Cannot find type definition file for 'mime'.
The file is in the program because:
Entry point for implicit type library 'mime'

error: script "build" exited with code 1
0 Replies
No replies yetBe the first to reply to this messageJoin