#api not updating
1 messages · Page 1 of 1 (latest)
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:
-
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 devcommand to not run properly. -
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.
-
Your
convex.jsonfile might not be configured correctly. Make sure it's in the same directory as yourpackage.jsonand has the correct settings. If you're using CommonJS syntax, you'll need to set"generateCommonJSApi": truein yourconvex.jsonfile. More details can be found in the Convex documentation (https://docs.convex.dev/client/javascript/node#javascript-with-commonjs-require-syntax). -
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 inconvex/_generatedwithout pushing. More details can be found in the Convex documentation (https://docs.convex.dev/cli#update-generated-code).