#Generating ts-api-spec gets stuck
6 messages · Page 1 of 1 (latest)
I'm sorry you're experiencing issues with the ts-api-spec generation freezing. Based on the knowledge sources, there isn't a direct mention of ts-api-spec specifically hanging, but there are several related reports of Convex CLI commands (like convex dev and convex deploy) hanging or getting stuck during various steps, often with no output or at steps like "Bundling modules for Convex's runtime..." or "Preparing Convex functions..."
Common troubleshooting steps that have helped others in similar situations include:
- Deleting and reinstalling your
node_modulesand lock files (e.g.,rm -rf node_modules package-lock.jsonorbun.lockbif using Bun, then reinstalling dependencies). - Ensuring your TypeScript configuration (
tsconfig.jsonandconvex/tsconfig.json) is correct and not causing issues. - Trying a different version of the Convex CLI, as some users have reported that rolling back to an earlier version (e.g., convex-js 1.25.0) resolved hanging issues.
- Running the CLI with verbose/debug flags (e.g.,
-v,CONVEX_VERBOSE=1, orCONVEX_DEBUG=1) to see if any additional output is provided. - Checking for any problematic or very large files recently added to your Convex functions directory, as these can sometimes cause memory or bundling issues.
If none of these steps resolve the issue, it may be a bug or an edge case in the CLI. In that case, sharing your setup and any recent changes on the Convex Discord or GitHub may help the team diagnose the problem more specifically.
References:
If you have more details (such as your OS, Node version, or any recent changes), feel free to share them for more targeted help.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@tulip lodge Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Let me check the knowledge base for you again. One moment! :books:
You're correct—the convex-helpers CLI commands (such as npx convex-helpers ts-api-spec) do not have a documented --verbose flag according to the knowledge sources. There is no explicit mention in the sources of a way to enable verbose or debug output for convex-helpers commands.
If the command is freezing with no output, the knowledge sources suggest general troubleshooting steps such as:
- Deleting and reinstalling
node_modulesand lock files. - Ensuring your TypeScript configuration is correct.
- Trying a different version of the
convex-helperspackage. - Checking for problematic files or recent changes in your Convex functions.
However, there is no documented way to enable verbose logging specifically for convex-helpers ts-api-spec. If the issue persists, you may want to reach out on the Convex Discord or open an issue for more targeted support, as this may be an edge case or bug not covered in the current documentation or support threads.
If you need to debug further, you could try running the command with environment variables like CONVEX_VERBOSE=1 or CONVEX_DEBUG=1, as these are sometimes supported by Convex tools, but there is no guarantee this will work for convex-helpers based on the available information stuck on npx convex deploy.