Tansatack start with convex error
i followed the guide , when i run , npm run dev , i get :
npm run dev
prodige@1.0.0 dev npx convex dev --once; npm-run-all --parallel dev:convex dev:starterror: unknown option '--once;'
40 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!
It looks like you might not be on the latest version of the NPM
convex
package. What version are you using?Are you on windows by chance?
yes
Joining in a separate thread, @4Twenty said:
Guys, I'm having an initialization error: convex 1.23.0 npm run dev convex@0.1.0 predev convex dev --until-success && convex dev --once --run-sh 'node setup.mjs --once' && convex dashboard . . . error: unknown option '--once'' (Did you mean --once?)(source: https://discord.com/channels/1019350475847499849/1359878397387608086) So you're both on windows, I'm on mac and unable to reproduce. I'll see if someone else on windows is able to repro.
thank you
Can you share your package.json
one moment , cause i delete it that project and used tanstack and added convex after
{
"name": "test",
"type": "module",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "npx convex dev --once; npm-run-all --parallel dev:convex dev:start",
"dev:convex": "convex dev",
"dev:start": "vinxi dev",
"seed": "npx convex dev --once; npx convex import --table tasks sampleData.jsonl",
"build": "vinxi build",
"start": "vinxi start"
},
"keywords": [],
"author": "",
"dependencies": {
"@convex-dev/react-query": "^0.0.0-alpha.8",
"@tanstack/react-query": "^5.59.20",
"@tanstack/react-router": "^1.82.1",
"@tanstack/react-router-with-query": "^1.82.1",
"@tanstack/start": "^1.82.1",
"convex": "^1.23.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vinxi": "^0.4.3"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"npm-run-all": "^4.1.5",
"typescript": "^5.6.3"
}
}
sorry coudn't send he file, it fails for some reason
hmm I bet it was the semi-colon
thanks, this is perfect. Can you see if replacing the semi-colon with
&&
lets it run for you?the working one from tanstack start docs is like this :
{
"name": "tanstack-start-example-convex-trellaux",
"private": true,
"sideEffects": false,
"type": "module",
"scripts": {
"dev": "npx convex dev --once && concurrently -r npm:dev:web npm:dev:db",
"dev:web": "vinxi dev",
"dev:db": "convex dev --run board:seed",
"build": "vinxi build",
"start": "vinxi start"
},
"dependencies": {
"@convex-dev/react-query": "0.0.0-alpha.8",
"@tanstack/react-query": "^5.66.0",
"@tanstack/react-query-devtools": "^5.66.0",
"@tanstack/react-router": "^1.115.2",
"@tanstack/react-router-with-query": "^1.115.2",
"@tanstack/react-router-devtools": "^1.115.2",
"@tanstack/react-start": "^1.115.2",
"concurrently": "^8.2.2",
"convex": "^1.19.0",
"ky": "^1.7.4",
"msw": "^2.7.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-hot-toast": "^2.5.1",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
"tiny-invariant": "^1.3.3",
"vinxi": "0.5.3",
"zod": "^3.24.2"
},
"devDependencies": {
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"postcss": "^8.5.1",
"autoprefixer": "^10.4.20",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.2",
"vite-tsconfig-paths": "^5.1.4"
}
}
ok i will
in tanstack start they use concurrently
but I notice they use && also after the --once flag
yes
are you on node 23?
sorry just trying to get all the info I can to understand the root cause here. Feels like something changed recently for windows users, not sure what
so the command worked now

but the app hass errors
white screen

the hydration mismatch I've seen before, but the screen is blank?
20.10.0
yes
okay, and the convex trellaux example you used from the tanstack docs works okay right? or is it blank as well
it works great, kanban example
okay, so the convex template needs to be fixed, will see if I can repro that
thanks for the info here
thank you for your time
in the convex template, did you run
npm run seed
before npm run dev
?If you've run the seed script, the app will look like this (just three text items in the top left)

yes i did
there is no text
blank error screen
i just realized that seed has the same error &&

yeah that's because of the semi-colon after --once, try replacing that with
&&
and rerunning the seed commandi did , teh seed worked
okay good, does dev have content now
err i mean does npm run dev work for you and show content on screen

okay awesome - still errors?
yes
I've seen those at times in dev with next ssr, might be a similar situation
as for the template itself, the tanstack start one is better , it show more of the features and i learn from it a lot , would love a similar template from the convex side but maybe with a crud simple app
i just checked the tanstack template log and there is no errors , but that's a separate issue

thanks so much for your help, we can close this issue now
Yeah might be nice to have a little more in the template, agree