I have a next js project and I am trying to deploy this project to vercel. While the project is properly built locally, when I try to deploy it to Vercel, I get a build error and this error is ‘Module Not Found’. The problem is that on the page where I imported the component that gives this error, the file path of the component is specified correctly and the component is exported correctly and as I said, there is no problem when I build locally. By the way, these two files are in the same directory. I need help with this issue.
The following is the error I get and the way I import
image1-import
image2-error
I have changed the way I imported the file many times, made changes to tsconfig, searched on stackoverflow but I couldn’t find the solution to the problem.
Tolga is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.