marwand
marwand3mo ago

No TypeScript binary found, so skipping typecheck

Yeah after referring to https://github.com/get-convex/convex-js/blob/68a31e140028e414447eba72ca89d889a17d8428/src/cli/lib/typecheck.ts#L100 , it indeed is not finding typescript. Looks like I didn't have typescript as a dev dependency. After adding it, it worked properly. My recommendations: - I based my monorepo on the get-convex template: https://github.com/get-convex/turbo-expo-nextjs-clerk-convex-monorepo/blob/main/packages/backend/package.json . It does not have typescript as a dependency in the backend package, which I believe is how the error got propagated. I'll open a pull request for that. - convex-cli should warn the user that tsc failed when typecheck is in 'try' mode. Otherwise you might get a false sense that your code has no errors.
GitHub
turbo-expo-nextjs-clerk-convex-monorepo/packages/backend/package.js...
Monorepo template with Turborepo, Next.js, Expo, Clerk, Convex - get-convex/turbo-expo-nextjs-clerk-convex-monorepo
GitHub
convex-js/src/cli/lib/typecheck.ts at 68a31e140028e414447eba72ca89d...
TypeScript/JavaScript client library for Convex. Contribute to get-convex/convex-js development by creating an account on GitHub.
1 Reply
ballingt
ballingt3mo ago
Glad you found --typecheck enable, that's what it's for. There's no warning because Convex works fine with JavaScript, TypeScript isn't required—but adding a warning could make sense, maybe if we also searched for .ts files to deduce that you're using TypeScript.

Did you find this page helpful?