Convex dev errors because of MDX types in Astro
I have an Astro project with a Preact component in it, and I'm using Convex in that component, following the React Quickstart on the Convex docs. But I get this error when I run
npx convex dev
:
The bizarre thing is that it did work at one point, so I can actually run the whole project and it runs fine (because the generated types exist). But I can't get it to work anymore, so future changes to my schema are not picked up. Even stepping back in my git history to when it definitely worked does not fix it.
I'm new to Convex, so maybe I'm missing something obvious like clearing a .gitignored folder or something. (I don't see any obvious culprits in my .gitignore though.) I loved the wind-in-my-hair feeling of running npx convex dev
the first time, when it set up my project for me and everything, but this error is the opposite of that. :/ Feeling very stuck.2 Replies
@CaptainNemo Looks sort of like this? https://github.com/withastro/astro/issues/5061
You can try using convex without typechecking,
npx convex dev --typecheck=disable
and just get your types in your editor
or the solution suggested there, add skipLibCheck
to the tsconfig.json at convex/tsconfig.json
Adding skipLibCheck seems like a a pretty sensible thing to do in this case
since Astro is doing is it already https://github.com/withastro/astro/pull/5872That worked!! Thank you so much for your help!