Mordsith
Mordsith4mo ago

Convex Auth Typescript Error with Vercel

A new convex deployment, first time deploy to Vercel throws this error
import type { MutationCtx } from "./_generated/server.d";
import { convexAuth } from "@convex-dev/auth/server";
import { ResendOTPProvider } from "./lib/auth/ResendOTPProvider";
import { getUserByEmail } from "./lib/utils/user";
import { createDefaultWorkspace } from "./lib/utils/workspace";

export const { auth, signIn, signOut, store } = convexAuth({
providers: [ResendOTPProvider],
callbacks: {
import type { MutationCtx } from "./_generated/server.d";
import { convexAuth } from "@convex-dev/auth/server";
import { ResendOTPProvider } from "./lib/auth/ResendOTPProvider";
import { getUserByEmail } from "./lib/utils/user";
import { createDefaultWorkspace } from "./lib/utils/workspace";

export const { auth, signIn, signOut, store } = convexAuth({
providers: [ResendOTPProvider],
callbacks: {
No description
5 Replies
Convex Bot
Convex Bot4mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Ask in the <#1228095053885476985> channel to get a response from <@1072591948499664996>. - Avoid tagging staff unless specifically instructed. Thank you!
Mordsith
MordsithOP4mo ago
{
/* This TypeScript project config describes the environment that
* Convex functions run in and is used to typecheck them.
* You can modify it, but some settings required to use Convex.
*/
"compilerOptions": {
/* These settings are not required by Convex and can be modified. */
"skipLibCheck": true,
"allowJs": true,
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleResolution": "Bundler",
"jsx": "react-jsx",
/* These compiler options are required by Convex */
"target": "ESNext",
"lib": ["ES2021", "dom"],
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"module": "ESNext",
},
"include": ["./**/*"],
"exclude": ["./src/_generated", "node_modules"]
}
{
/* This TypeScript project config describes the environment that
* Convex functions run in and is used to typecheck them.
* You can modify it, but some settings required to use Convex.
*/
"compilerOptions": {
/* These settings are not required by Convex and can be modified. */
"skipLibCheck": true,
"allowJs": true,
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleResolution": "Bundler",
"jsx": "react-jsx",
/* These compiler options are required by Convex */
"target": "ESNext",
"lib": ["ES2021", "dom"],
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"module": "ESNext",
},
"include": ["./**/*"],
"exclude": ["./src/_generated", "node_modules"]
}
"@convex-dev/auth": "^0.0.67",
"convex": "^1.16.0",
"@convex-dev/auth": "^0.0.67",
"convex": "^1.16.0",
sshader
sshader4mo ago
Thanks for the report -- I believe types should be fixed in 0.0.69
Mordsith
MordsithOP3mo ago
@sshader Error still persists on vercel after upgrading to version 0.0.69 More info:
"next": "15.0.0-canary.157",
"react": "19.0.0-rc-a99d8e8d-20240916",
"next": "15.0.0-canary.157",
"react": "19.0.0-rc-a99d8e8d-20240916",
Temporary workaround
const convexAuthData = convexAuth({
providers: [ResendOTPProvider],
});

export const auth: any = convexAuthData.auth;
export const signIn: any = convexAuthData.signIn;
export const store: any = convexAuthData.store;
export const signOut: any = convexAuthData.signOut;
const convexAuthData = convexAuth({
providers: [ResendOTPProvider],
});

export const auth: any = convexAuthData.auth;
export const signIn: any = convexAuthData.signIn;
export const store: any = convexAuthData.store;
export const signOut: any = convexAuthData.signOut;
sshader
sshader3mo ago
Hmm I'll try and reproduce the type error on my end (thanks for sending over tsconfig + npm versions)

Did you find this page helpful?