Hi Pawlean, Thanks for the help… But it seems doesn’t work for me… I check the file names and cases, all are correct. Attached the screenshot of my folder structure. While calling the function checkuser (present under lib folder, checkuser.ts
) from the file route.ts under api (highlighted in yellow), giving the error.
Did you find a solution? I have tried everything and double checked all. Previously successful deployments are also bringing up these same errors when redeploying. Help
Doesn’t work. Previous production versions that were built successfully are failing with the module not found errors on vercel. No change in code. I even installed a fresh version of nextjs with no modifications and deployed to a preview branch and the build still failed with module not found for all files.
My npm install setup has always included --force without any problems. But for some reason, that was now breaking the application and causing module not found errors only on Vercel.
I took off the force flag and the errors disappeared.
I still don’t know why I was getting a module not found error even though that had nothing to do with npm install --force