auth.config in TypeScript
@Edwin asked:
good day folks. i'm just setting up clerk with convex on react native expo and i've come across a problem. the documentation uses javascript to set up auth.config, however, my app uses typescript. so instead of convex/auth.config.js, i created convex/auth.config.ts and running npx convex dev gives me this error:
Image
sticking to the documentation with convex/auth.config.js also gives me type errors. i appreciate any help with this 🙂
8 Replies
Hey @Edwin , make sure you're on the latest version of Convex, and use
auth.config.js
. You shouldn't need to import from this file (and generated files shouldn't import from it either).
npx convex --version
should print 1.0.3
or similar (at least 0.19.0).thanks for the response. my convex version is 1.0.3 and here's a snip of what i get when i run
npx convex dev
with auth.config.js
set up:for reference, here's what my
auth.config.js
looks likeand deleting the file also clears up the type errors in the console
@Edwin I'd add
"skipLibCheck": true
to your convex/tsconfig.json file
these are TypeScript errors from the TypeScript type check that convex does before deployingthat works. thank you for the help!