Unable to get proper API typing in IDE
After switching to a monorepo setup (PNPM workspaces with NX), I am no longer able to get typing/auto complete with api. aside from auth functions and one other function set.
Deleting the _generated folder and running npx convex dev doesn't solve the issue.
_generated/api.d.ts appears to contain all the correct typing.
My frontend (Tanstack Start) TS config:
3 Replies
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.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
What about your config in the convex folder?
Are you dealing with type errors in the code? And do you happen to be using the relative path import or the shortened one?
@Sara
tsconfig in the convex folder
An example import
Then in a query like this, the IDE will show an error for
There error shown:
But if I check _generated/api.d.ts, import type * as events from "../events.js"; is present. It seems like the file is being generated as normally, but the api is using some sort of old cached version.