Errors while deploying on Vercel.
I'm getting the following error while deploying on Vercel.
Everything works fine locally and the initial deployment was successful (with issues).
This is the link to the codebase: https://github.com/akinloluwami/linkdrive
vite v5.4.11 building for production...
transforming...
✓ 104 modules transformed.
x Build failed in 2.80s
[error] Could not resolve "../components/sidebar" from "app/routes/_authed.tsx?tsr-split"
file: /vercel/path0/app/routes/_authed.tsx?tsr-split
file: app/routes/_authed.tsx?tsr-split
at getRollupError (node_modules/rollup/dist/es/shared/parseAst.js:396:41)
at error (node_modules/rollup/dist/es/shared/parseAst.js:392:42)
at ModuleLoader.handleInvalidResolvedId (node_modules/rollup/dist/es/shared/node-entry.js:20088:24)
at node_modules/rollup/dist/es/shared/node-entry.js:20048:26
[error] Could not resolve "../components/sidebar" from "app/routes/_authed.tsx?tsr-split"
file: /vercel/path0/app/routes/_authed.tsx?tsr-split
[error] Exited with code: 1
at CommandChild.pipedStdoutBuffer (node_modules/dax-sh/esm/mod.js:9392:19)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[error] Exited with code: 1
Error: Command "npm run build" exited with 1
GitHub
GitHub - akinloluwami/linkdrive
Contribute to akinloluwami/linkdrive development by creating an account on GitHub.
3 Replies
conventional-tan•9mo ago
does a local prod build work?
can you try deploying without the build cache?
conventional-tan•9mo ago
GitHub
How can I clean the build cache? · vercel · Discussion #457
Same issue in Next.js. Resolved by delete node_modules and reinstall. But dont work in vercel deployment, because it use the build cache. How to clean build cache?
passive-yellowOP•9mo ago
Yes, local prod build works.
Redeploy without build cache fails.
Deploying with Vercel CLI works.
I have another issue:
The styles are not applied in prod.