The inferred type of X cannot be named without a reference (some module path)
Hello Convex team
I've recently started with Turborepo and migrated my existing app to turborepo. earlier I had some issue so I'm going with simpler approach i.e. add convex in the
apps/web
only just like a simple nextjs app.
But while build I'm having a type issue:
Code link (which line where error is happening) - https://github.com/vignesh-gupta/projectify/blob/729c37b6035a8bcb86ab3317de72b7c3420f5c13/apps/web/convex/resources/storage.ts#L5C14-L5C32GitHub
projectify/apps/web/convex/resources/storage.ts at 729c37b6035a8bcb...
Struggling to stay organized and meet deadlines? Projectify is the ultimate free project management tool for you! Boost your productivity and achieve your goals effortlessly with our intuitive fea...
1 Reply
I'd guess that adding an explicit return type annotation (
Promise<string>
) to that function would help. TypeScript might be trying to infer its type in a weird way that relies on a Convex type that hasn't been exported, but an explicit type annotation would prevent that.
In general, I'd add more explicit type annotations to try and narrow down exactly what's causing this issue.