create-react-app `convex/` folder location
Using a regular setup via
npx create-react-app
. Getting this error:
Since the convex library created the convex folder in that location, is a symlink the recommended solution?
Here is my project and the relevant part of New.tsx

14 Replies
Hi, thank you in advance for the help!
I'm at ETHDenver, haven't used Convex before 🙂
You can move the
convex/
directory to src/convex/
, just update the line in convex.json too
When you start a new Convex project with npx convex init
, it's supposed to detect create-react-app and create the convex/
functions directory at src/convex/
Here's my
convex.json
:
which line?maybe this isn't working, or you created the convex directory manually
Change
"functions": "convex/"
to "functions": "src/convex/"
If I messed something up I can try removing and adding the config again
Changing it manually isn't bad, it's just moving the folder, changing this line. I'm just curious if the Convex code detecting
create-react-app
isn't working so I can fix it.That seems to have fixed the error!
Let us know if you hit any other issues!
Thank you! I will 🙂
Hmm, I think I'm missing something. When I do an insert, I'm not getting any result (success/fail, here's the new ID, etc). How do I get that?

/src/convex/contracts.ts:
Oh, I should be doing
return await db.insert()
? Hm, no that doesn't seem to help.Hm. Now I'm getting this error, that's odd:

And I am running
npm run start
which then does concurrently 'convex dev' 'react-scripts start'
Hm! Maybe try running
npx convex dev
alone to make sure this is running