CaptainNemo
CaptainNemo
CCConvex Community
Created by CaptainNemo on 8/2/2023 in #support-community
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:
node_modules/@types/mdx/types.d.ts:22:19 - error TS2503: Cannot find namespace 'JSX'.

22 [Key in keyof JSX.IntrinsicElements]?: Component<JSX.IntrinsicElements[Key]>;
~~~
node_modules/@types/mdx/types.d.ts:22:19 - error TS2503: Cannot find namespace 'JSX'.

22 [Key in keyof JSX.IntrinsicElements]?: Component<JSX.IntrinsicElements[Key]>;
~~~
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.
7 replies