#api not updating

1 messages · Page 1 of 1 (latest)

rigid mango
#

I created a new table but the api file is not updating to when I run npx convex dev.

sweet frostBOT
#

Hi @rigid mango. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The npx convex dev command should watch your local filesystem and update the generated types in convex/_generated when you change a function or the schema. If this is not happening, there could be a few reasons:

  1. There might be an issue with your network connection. As seen in the Discord support thread (https://discord.com/channels/1019350475847499849/1229346783604510730), a network blip or bad connection can cause the npx convex dev command to not run properly.

  2. There could be an issue with your local setup. Make sure you have the correct versions of Node.js, NextJs, and Convex installed. Also, check if there are any errors in your terminal when you run the command.

  3. Your convex.json file might not be configured correctly. Make sure it's in the same directory as your package.json and has the correct settings. If you're using CommonJS syntax, you'll need to set "generateCommonJSApi": true in your convex.json file. More details can be found in the Convex documentation (https://docs.convex.dev/client/javascript/node#javascript-with-commonjs-require-syntax).

  4. If you're still having issues, you can try to manually update the generated code by running npx convex codegen. This command updates the generated code in convex/_generated without pushing. More details can be found in the Convex documentation (https://docs.convex.dev/cli#update-generated-code).

If none of these solutions work, I recommend reaching out to the Convex support team for further assistance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: