nikiv.dev
nikiv.dev2d ago

hey all, can someone help deploy my

hey all, can someone help deploy my convex site to vercel please getting this error but I do the command as per convex docs for the build
No description
No description
82 Replies
nikiv.dev
nikiv.devOP2d ago
https://github.com/genxai/new my project is open source here
Sara
Sarathis hour
you somehow don't have a _generated Folder, you need to run the command npx convex dev and once your API is generated you should run the npm build command locally, and fix the errors in your repo. and I'd generally not import the api like that, I'd create a path resolver in my tsconfig to reolve the path for example
nikiv.dev
nikiv.devOPthis hour
so do I run this locally npx convex dev then commit the generated files?
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
mby it should be done at build phase? somewhere here perhaps
jamwt
jamwtthis hour
yep, commit the generated files when you commit whatever code uses it
nikiv.dev
nikiv.devOPthis hour
ok lovely, comitting
jamwt
jamwtthis hour
that's why _generated isn't in the .gitignore
nikiv.dev
nikiv.devOPthis hour
thanks for reply
jamwt
jamwtthis hour
no problem
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
it generated nothing the setup.mjs is formatter i discarded it
nikiv.dev
nikiv.devOPthis hour
its there actually
No description
nikiv.dev
nikiv.devOPthis hour
vercel doesn't see it, it seems ohh
Sara
Sarathis hour
you need to push to github first..
nikiv.dev
nikiv.devOPthis hour
@Topf git ignored that folder i wonder why he chose to git ignore it ok removing that line its kind of weird to push generated files to remote tho i'd think like it can be done at deploy stage maybe? wouldn't it overload git history? but ok comitting it
nikiv.dev
nikiv.devOPthis hour
its not that many files
No description
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
ok checking what it means
nikiv.dev
nikiv.devOPthis hour
or this is prob off
No description
nikiv.dev
nikiv.devOPthis hour
I assume at this point, the tokens don't get passed maybe thats from docs
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
maybe i need env here
jamwt
jamwtthis hour
no, the environment variable gets set in the vercel environment
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
ok i set these
jamwt
jamwtthis hour
see step 4 CONVEX_DEPLOY_KEY
nikiv.dev
nikiv.devOPthis hour
mm
No description
nikiv.dev
nikiv.devOPthis hour
p.s. the project runs locally thats with deploy_key
Sara
Sarathis hour
well, I'd run npm build locally and resolve all the issues first
nikiv.dev
nikiv.devOPthis hour
a strange @Topf doesn't have a bulid command
nikiv.dev
nikiv.devOPthis hour
GitHub
GitHub - Topfi/BetterAuth-Convex-9ui-shadcn-CLI-: 🔐 A polished B...
🔐 A polished Better Auth + Convex setup with React 19 & Vite. Full auth flows (magic links, OTP, TOTP, social sign-in), strong security, styled UI, & realtime sync. Perfect for MVPs...
nikiv.dev
nikiv.devOPthis hour
i started building on convex from his template as it looked great ok checking what build cmd should be prob smth with vite
nikiv.dev
nikiv.devOPthis hour
ok lets see
No description
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
npm run generate && vite build i guess this should be it npm run generate && npx vite build ok this more accurate
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
yea ok locally it passes smth off in vercel checking docs I do have this
Sara
Sarathis hour
I'd stop writing messages here, since technically your main issue is resolved 😅
nikiv.dev
nikiv.devOPthis hour
should I make new thread? my thread was about deploying to vercel but it didn't deploy all builds fail
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
I basically want to get local convex project deployed on vercel I set the right envs I think
nikiv.dev
nikiv.devOPthis hour
i wonder if i can get this /vercel/.npm/_logs/2025-09-23T17_08_21_706Z-debug-0.log
No description
nikiv.dev
nikiv.devOPthis hour
in vercel to see why build fails in vercel
nikiv.dev
nikiv.devOPthis hour
oh interesting it generated smth new
No description
nikiv.dev
nikiv.devOPthis hour
going to push this mby thats the issue
nikiv.dev
nikiv.devOPthis hour
yea same issue
No description
Sara
Sarathis hour
nope, just use the time taken to write messages here in debugging your issue
nikiv.dev
nikiv.devOPthis hour
yea I am trying to understand the reason but vercel is not saying much
Sara
Sarathis hour
did AI write the code?
nikiv.dev
nikiv.devOPthis hour
ok trying to open that log file
nikiv.dev
nikiv.devOPthis hour
GitHub
GitHub - Topfi/BetterAuth-Convex-9ui-shadcn-CLI-: 🔐 A polished B...
🔐 A polished Better Auth + Convex setup with React 19 & Vite. Full auth flows (magic links, OTP, TOTP, social sign-in), strong security, styled UI, & realtime sync. Perfect for MVPs...
nikiv.dev
nikiv.devOPthis hour
+ few changes but those changes shouldn't affect the build its mostly changing landing page and avoiding redirect locally it works and opens its using latest react 19 but i assume convex works with 19 A patch update is available for Convex (1.27.1 → 1.27.3) also going to up convex
Clever Tagline
Clever Taglinethis hour
In more than one screenshot, it shows Missing script: "build" Confirm that there's a build script defined in package.json
nikiv.dev
nikiv.devOPthis hour
omg you are right "build": "npm run generate && npx vite build", ok added this and building thank you or actually
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
I guess build should be this "build": "npx convex deploy --cmd 'npm run build'",
Clever Tagline
Clever Taglinethis hour
Yeah, that's what it should be
nikiv.dev
nikiv.devOPthis hour
oo promising
No description
nikiv.dev
nikiv.devOPthis hour
it doom loops
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
i wonder why oo
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
maybe this needs change ok trying with this
nikiv.dev
nikiv.devOPthis hour
No description
nikiv.dev
nikiv.devOPthis hour
ok cancelling this
No description
Clever Tagline
Clever Taglinethis hour
I don't have much time, but let me check the one app I've got on Vercel. It's been so long since I deployed it that I forgot how it's configured.
nikiv.dev
nikiv.devOPthis hour
thank you https://github.com/genxai/new I pushed latest changes here
Clever Tagline
Clever Taglinethis hour
In Vercel, I've got the override mentioned in the docs: npx convex deploy --cmd 'npm run build' In my project's package.json, it has the build command for the framework I'm using (React Router), which is just react-router build Sorry, but I don't have the time to dig into project files myself. I shouldn't even be in here, but something about the size of this thread intrigued me. 😂 Gotta get back to work
nikiv.dev
nikiv.devOP23h ago
oh wow
No description
nikiv.dev
nikiv.devOP23h ago
ok cancelled maybe I need to install vercel adapter? this is using react router I remember with tanstack start for example, you would have vercel() adapter
import { defaultClientConditions, defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import tailwindcss from "@tailwindcss/vite"
import path from "path"

export default defineConfig({
plugins: [
react({
babel: {
plugins: [
["babel-plugin-react-compiler", { compilationMode: "infer" }],
],
},
}),
tailwindcss(),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
conditions: ["@convex-dev/component-source", ...defaultClientConditions],
dedupe: ["react", "react-dom"],
},
test: {
environment: "jsdom",
},
})
import { defaultClientConditions, defineConfig } from "vite"
import react from "@vitejs/plugin-react"
import tailwindcss from "@tailwindcss/vite"
import path from "path"

export default defineConfig({
plugins: [
react({
babel: {
plugins: [
["babel-plugin-react-compiler", { compilationMode: "infer" }],
],
},
}),
tailwindcss(),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
conditions: ["@convex-dev/component-source", ...defaultClientConditions],
dedupe: ["react", "react-dom"],
},
test: {
environment: "jsdom",
},
})
although that was with vinxi ok I found issue for infinite loop
nikiv.dev
nikiv.devOP23h ago
i used command from the docs
No description
nikiv.dev
nikiv.devOP23h ago
but it infinite loops with it "build": "npx convex deploy", trying with this now "build": "vite build", ok this actually, above is wrong too I am not sure why happy path of vercel is not working tho
nikiv.dev
nikiv.devOP23h ago
No description
No description
nikiv.dev
nikiv.devOP23h ago
wild ok i think SITE_URL needs to be in convex dash too https://dev.gen.new yayy
nikiv.dev
nikiv.devOP23h ago
:magic_sparkles:
No description
nikiv.dev
nikiv.devOP23h ago
thanks everyone for the help, really appreciate it

Did you find this page helpful?