mrblahblahmeow
mrblahblahmeow12mo ago

Typescript error

Hey all, I keep getting this error: To ignore failing typecheck, use --typecheck=disable. convex/providers/convex-client-provider.tsx:9:25 - error TS2307: Cannot find module '@/components/auth/loading' or its corresponding type declarations. 9 import { Loading } from "@/components/auth/loading"; // Loading component ~~~~~~~ Found 1 error in convex/providers/convex-client-provider.tsx:9 The file path is correct and Convex wont seem to recognize my schema until I resolve this error. Any idea what to do?
8 Replies
erquhart
erquhart12mo ago
The @ alias is likely the issue - do you use that alias in both your src and convex directories or solely in convex? You can confirm by trying a relative path instead of the alias
mrblahblahmeow
mrblahblahmeowOP12mo ago
I have tried using the relative path as well and updated both the convex-client-provider.js & convex-client-provider.tsx file. When I attempted to import the <Loading /> component it wouldnt even acknowledge that the file exists.
No description
mrblahblahmeow
mrblahblahmeowOP12mo ago
No description
No description
erquhart
erquhart12mo ago
I'm confused - the typecheck error should only be for convex code, not client side Is convex/providers/convex-client-provider.tsx a file in your repo? If you're keeping any client side code in your convex/ directory, you'll want to move it out
mrblahblahmeow
mrblahblahmeowOP12mo ago
Ahhh that was it. I accidentally nested a folder under /convex. Thank you!
erquhart
erquhart12mo ago
No problem! Glad it was simple
mrblahblahmeow
mrblahblahmeowOP12mo ago
Ill probably post here with more questions later on! Haha. Just starting on my dev journey 😄
erquhart
erquhart12mo ago
Nice! Happy to help 👍

Did you find this page helpful?