Next.js Discord

Discord Forum

Module not found: Can't resolve '@...' with NextJS 15 and docker

Unanswered
California pilchard posted this in #help-forum
Open in Discord
California pilchardOP
IM facing to an issue with my nextjs app using a Dockerfile. My docker build is working in local but when I try to make it work on my VPS (using Coolify) I have :
./src/app/[lang]/(app)/(privateroutes)/collection/likes/_components/table/component/columns.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 Module not found: Can't resolve '@/components/badge/BadgeMedia'
2025-Jan-28 23:11:04.332748
#18 59.17 
2025-Jan-28 23:11:04.332748
#18 59.17 https://nextjs.org/docs/messages/module-not-found
2025-Jan-28 23:11:04.332748
#18 59.17 
2025-Jan-28 23:11:04.332748
#18 59.17 Import trace for requested module:
2025-Jan-28 23:11:04.332748
#18 59.17 ./src/app/[lang]/(app)/(privateroutes)/collection/likes/_components/table/TableLikes.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 ./src/app/[lang]/(app)/(privateroutes)/collection/likes/page.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 
2025-Jan-28 23:11:04.332748
#18 59.17 ./src/app/[lang]/(app)/(privateroutes)/collection/my-recos/_components/table/component/columns.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 Module not found: Can't resolve '@/components/badge/BadgeMedia'
2025-Jan-28 23:11:04.332748
#18 59.17 
2025-Jan-28 23:11:04.332748
#18 59.17 https://nextjs.org/docs/messages/module-not-found
2025-Jan-28 23:11:04.332748
#18 59.17 
2025-Jan-28 23:11:04.332748
#18 59.17 Import trace for requested module:
2025-Jan-28 23:11:04.332748
#18 59.17 ./src/app/[lang]/(app)/(privateroutes)/collection/watchlist/_components/table/TableWatchlist.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 ./src/app/[lang]/(app)/(privateroutes)/collection/watchlist/page.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 
2025-Jan-28 23:11:04.332748
#18 59.17 ./src/app/[lang]/(app)/film/[film_id]/(default)/reviews/page.tsx
2025-Jan-28 23:11:04.332748
#18 59.17 Module not found: Can't resolve '@/components/review/MyReviewButton'
...

But all these components are in my code and work in local. So i have no idea why isnt working

1 Reply

California pilchardOP
Damn im tired of Nextjs ahah there is no reason for having this issue 😂