gijoe
February 16, 2023, 5:27pm
1
I have deployed react apps previously with the following setup, but with Vite seems not to work:
Branch: dev.
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.
1 Like
Responded privately.
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.
gijoe
February 17, 2023, 2:17pm
3
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
gijoe
March 2, 2023, 12:56pm
5
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.
1 Like
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