You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy my full front-end backend app with Monorepo on Vercel using turbo repo.
and every time I push it shows me an error called dist folder not found and now once I setup everything correctly it just does not show anything in there just shows white blank screen.
I am using vitejs module in react.
This is my vite.config.js looke like
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
build: {
outDir: 'dist',
assetsDir: 'assets',
emptyOutDir: true,
rollupOptions: {
input: './index.html', // Ensure relative paths are used
}
},
base: './', // Ensure relative paths are used
server: {
port: 3000
},
// Ensure fallback to index.html for SPAs
resolve: {
alias: {
'@': '/src'
}
},
esbuild: {
jsxInject: `import React from 'react'`
}
})
and this is what my Build & Development Settings are set to on vercel project setting
Note: I have tried various of ways to do it but still nothing so far :(
Build Command: cd apps/fe-service && pnpm install && cd ../.. && npx turbo run build --filter=fe-service
Output Directory : apps/fe-service/dist
Root Directory: is set to empty since I am doing cd and all so.
and that's what I get from vercel
and empty white screen.
PS: on my local everything is working it does build correctly serve the frontend correctly but it just does not build correctly on vercel. please help me if you have any idea. Thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
I am trying to deploy my full front-end backend app with Monorepo on Vercel using turbo repo.
and every time I push it shows me an error called dist folder not found and now once I setup everything correctly it just does not show anything in there just shows white blank screen.
I am using vitejs module in react.
This is my vite.config.js looke like
and this is my vercel.json looks like
and inside my root folder I also have turbo.json and vercel.json
that looks like this
turbo.json
vercel.json
and this is what my Build & Development Settings are set to on vercel project setting
Note: I have tried various of ways to do it but still nothing so far :(
Build Command: cd apps/fe-service && pnpm install && cd ../.. && npx turbo run build --filter=fe-service
Output Directory : apps/fe-service/dist
Root Directory: is set to empty since I am doing cd and all so.
and that's what I get from vercel
and empty white screen.
PS: on my local everything is working it does build correctly serve the frontend correctly but it just does not build correctly on vercel. please help me if you have any idea. Thank you!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions