2 months ago
I've an issue when i deploy a deployment package uploaded on a Github Repositry at the following link
https://github.com/aymancloud1-source/CorpManageSysV1.2
these deployment package created by replit website i face the following problem
npm run build
1s
npm warn config production Use --omit=dev instead.
> rest-express@1.0.0 build
> vite build && esbuild server/index.ts --platform=node --packages=external --bundle --format=esm --outdir=dist
vite v5.4.20 building for production...
✓ 0 modules transformed.
x Build failed in 11ms
error during build:
Could not resolve entry module "client/index.html".
at getRollupError (file:///app/node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at error (file:///app/node_modules/rollup/dist/es/shared/parseAst.js:392:42)
at ModuleLoader.loadEntryModule (file:///app/node_modules/rollup/dist/es/shared/node-entry.js:20086:20)
at async Promise.all (index 0)
Build Failed: build daemon returned an error < failed to solve: process "npm run build" did not complete successfully: exit code: 1 >
i need a solution to solve that issue
2 Replies
2 months ago
Your client/ folder is missing from the GitHub repo, Replit didn’t push it. Vite expects client/index.html but that directory doesn’t exist in the repo.
Go back to Replit and try to add, commit and push the client/ folder:
git add client/ && git commit -m "Add client folder" && git push
If this is backend-only, remove the vite build from your package.json build script.
2 months ago
The error means Vite can’t find client/index.html. Your build config is pointing to client/index.html as the entry, but that file/path doesn’t exist in the repo, so Rollup fails.
Fix it by either updating your Vite config (or build command) so the root/entry matches where index.html actually lives, or by creating the client/index.html file in that location. Also check the RAILWAY_DEPLOYMENT.md in the repo and use its suggested build/start commands, since it’s tailored for this template.