Module not found on vercel deployment
Answered
oguisantosilva posted this in #help-forum
Hello, when i try to deploy a project on vercel, on the build time, it gives an error of module not found.
Answered by oguisantosilva
11 Replies
Localy, on dev, there's no problem, maybe do i need some config for the alias on vercel deployment?
Cornish Rex
You might have some modules installed globally in local
@Cornish Rex You might have some modules installed globally in local
I don't understand? whats the problem of having modules globally installed in local?
Failed to compile.
./app/app/messages/page.tsx
Module not found: Can't resolve '../../../components/ui/navbar'
https://nextjs.org/docs/messages/module-not-found
./app/app/profile/page.tsx
Module not found: Can't resolve '@/components/ui/navbar'
https://nextjs.org/docs/messages/module-not-found
./app/app/send/page.tsx
Module not found: Can't resolve '@/components/ui/navbar'
https://nextjs.org/docs/messages/module-not-found
./app/app/settings/page.tsx
Module not found: Can't resolve '@/components/ui/navbar'
https://nextjs.org/docs/messages/module-not-found
> Build failed because of webpack errors
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1
I build localy and no problems, its just in the deployment in vercel
its not about the modules
i think i almost figure it out
Cornish Rex
if locally building went success, there will be no another reason to fail on Vercel
there is, already fixed
i am putting the solution here for people with the same error