I can’t deploy my vite react website, terminal keep giving me this error: error during build:
[vite:build-html] Failed to resolve /src/main.jsx from /vercel/path0/index.html
file: /vercel/path0/index.html
at file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:36310:29
at async Promise.all (index 0)
at async Object.handler (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:36507:11)
at async transform (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:21001:16)
at async ModuleLoader.addModuleSource (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:21214:36)
Error: Command “npm run build” exited with 1
I tried everything, if you check the commits history here in github you can see how many times I tried to change index.html and vite.config.js
I think my problem is the same as this: React app i created using vite has refused to deploy despite it working fine on local host and run build
The build locally works fine and everything seems good.