api is possibly undefined when imported from turborepo backend package.
import { api } from "@workspace/backend-new/convex/_generated/api"; to get my api into my frontend. To load and use api calls to fetch things like org data, image urls etc. But it tells me that the api might be undefined. No matter what I do and has no relevant support case or docs tied to this issue. Have I misconfigured something in my backend? I have attached screenshots of the code snippet, the error it shows and the code used for the api request I am calling, as well as the folder structure for said file.Does anyone know how I can fix this? Why would api be undefined when imported like this, and why would things like api.api be undefined then object be undefined if I make them both known with the
api!.api!.internal method. I feel like I have done something wrong, and my entire api is not being typed or created properly. But when I asked the convex ai about it, it said it was all fine and perfectly creating the types needed to use in the frontend. So I am lost about what went wrong. And why I cannot use it on the frontend in a useQuery.


