React quickstart breaks on `npm run dev:frontend`
I ran
npm create convex@latest
and then npm run dev
but I'm getting an error.
15 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
AI solved this for me.
One option is to rename
tailwind.config.js
to tailwind.config.cjs
.
Another is to change require
to import
.
There might be other solutions too. Can we get one of these changes into the template?On it, thanks @Squirble!
oh @Squirble which template is this, how did you answer the questions?
Also what version of Node.js are you using?
React (Vite)
Node.js v22.12.0
with Convex Auth, but no Github or Resend
Also I set the
SITE_URL
to http://localhost:5002
but that doesn't seem to be being honoredwhere are you setting it?
it asks
and when you run
npx convex env list
it's the wrong value?
or view it from npx convex dashboard
-> Settings -> Environment Variablesno, I just mean it ends up running dev on vite's default port anyway
ah got it, yeah you're just configuring the convex backend there, not the frontend vite server
you'll need to also change this line in package.json
"dev:frontend": "vite --open",
to add a flag for the port you wanthm, this auth is useless if I don't configure resend or github, I see.
Hm I can't repro your tailwind issue even with Node.js 22
You can configure a password strategy without email
Did you make any other changes to this project? I agree this looks wrong unless tailwind does something unusual to load its config file but I can't trigger this error
no changes
just ran
npm run dev:frontend
Well it always happens for me.
I've run into the tailwind thing too
seeing if I can still repro
@ballingt this does not happen with node 22.0.0, but does happen with 22 latest, so something broke in between. What's really crazy is it doesn't happen in 23 🤷♂️
nope, it breaks in a v22 minor/patch and is fixed in a v23 minor/patch. Wonder why the fix wasn't backported.
https://github.com/get-convex/template-react-vite-shadcn/pull/2
This may or may not be the desired approach, it's just the one I'd take.