When running locally, I can run "next build" without problems. The command "vercel build" also works without problems. But as soon as I deploy to vercel, the "Linting and checking validity of types" fails when it's being built on vercel. Typescript is set to strict mode, but it is as if it's even stricter in when running in vercel even though it's the same codebase.
The app is based on the create-t3 app. It stops building on vercel as soon as I add a "select" statement in a prisma findUnique query. Such as in the "check-credentials" file.
In the console in vercel, it would output the following error:
info - Linting and checking validity of types...
Failed to compile.
./src/pages/api/user/check-credentials.ts:33:7
Type error: Type '{ id: true; name: true; email: true; image: true; password: true; }' is not assignable to type 'UserSelect'.
Object literal may only specify known properties, and 'password' does not exist in type 'UserSelect'.
31 | email: true,
32 | image: true,
> 33 | password: true,
| ^
34 | },
35 | });
36 | if (user && user.password == hashPassword(req.body.password)) {
I have created a clone of the repository, as my best guess is that there might be a problem with ts validation and linting being ignored locally, but not on deploys: https://github.com/Andreaswt/t3-app