I'm developing a project within a team wherein our React client consumes the Convex API. As of the moment, the onboarding process and development environment setup is quite cumbersome due to unintended(?) actions caused by npx convex dev.
We have a client/convex.json file that specifies the following information that is crucial to the functionality of the client side:
{
"functions": "./src/_convex"
}
Running npx convex dev and going through the setup wizard deletes this file and then results in a [CONVEX Q(files:getFilesByDocumentId)] Could not find public function for 'files:getFilesByDocumentId'. Did you forget to run `npx convex dev` or `npx convex deploy`? error.
Demo
The Suggestion
If it's possible, npx convex dev shouldn't delete these configuration files on directories without .env.local's Convex files. Or perhaps, the wizard can ask questions if there is an existing configuration files or if there are files to ignore during the initialization process.
Also, an npx convex dev --verbose flag would be nice to see explicit updates on any file changes.
@Luzefiru that sounds like a bug. We'll look into it. Meanwhile make sure you are on the latest version of convex, as the issue might have already been fixed.
Background Information
I'm developing a project within a team wherein our React client consumes the Convex API. As of the moment, the onboarding process and development environment setup is quite cumbersome due to unintended(?) actions caused by
npx convex dev
.We have a
client/convex.json
file that specifies the following information that is crucial to the functionality of the client side:Running
npx convex dev
and going through the setup wizard deletes this file and then results in a[CONVEX Q(files:getFilesByDocumentId)] Could not find public function for 'files:getFilesByDocumentId'. Did you forget to run `npx convex dev` or `npx convex deploy`?
error.Demo
The Suggestion
If it's possible,
npx convex dev
shouldn't delete these configuration files on directories without.env.local
's Convex files. Or perhaps, the wizard can ask questions if there is an existing configuration files or if there are files to ignore during the initialization process.Also, an
npx convex dev --verbose
flag would be nice to see explicit updates on any file changes.