I have deployed react apps previously with the following setup, but with Vite seems not to work:
Root directory: Blank (Using src folder)
Build command: npm run build.
Publish directory: build.
Github repo at the moment is private, does this affect in anything?
Does someone has an example to deploy simple Vite app in render?
Appreciate the support.
The default build output for Vite is
dist, so we would recommend trying that, unless a specific
build.outDir is specified. See https://vitejs.dev/guide/static-deploy.html#deploying-a-static-site for more details.
Thanks for the support @jade_Paoletta. I’ve got it to advance but not completely, now the error is vite: not found. Still figuring it out.
Hi Joe, have you figured it out yet? I have this same issue
Hi @damilola1ade, yes I did. In the field of build command you should have npm run build, and in the publish directory you should have the dist folder. Just write dist.
Hope it’s helpful.
Thanks this helped me deploy my Vite app (with pnpm)
Running build command ‘npm run build’…
npm ERR! missing script: build,
I’m getting this error what should I do
I had a similar issue… what i did to resolve it was leave the base directory empty
base directory: (leave blank)
build command: npm run build
publish directory: dist
I hope it helps(:
Hi, I don’t see an option to set the publish directory. And by base directory are you referring to the ‘root directory’?
Ooooh wait… For a Vite app, should I be creating a Static Site, rather than a ‘Web Service?’
Hi GSCrawley, have you figured it out yet? I have this same issue.
And If I go for static ( not sure I can go run my site as static) it says “no found” once everything is deployed and running.
hi no I never did figure it out, I ended up abandoning render, but still haven’t been able to deploy the project because I’ve gotten stuck with problems with the openAI API. good luck!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.