I’m currently having an issue with Vercel where it’s not recognizing a file even tho it exists in the files.
the problem:
Issue:
Every time i try deploying my project to Vercel i keep getting the error the file exitsts (screen shot below) also it works fine in local:
Cannot find module ‘../middlewares/authMiddleWare’
Require stack:
- /var/task/controllers/userController.js
- /var/task/routes/userRoutes.js
- /var/task/index.js
Did you forget to add it to “dependencies” inpackage.json
?
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
INIT_REPORT Init Duration: 857.03 ms Phase: init Status: error Error Type: Runtime.ExitError
Cannot find module ‘../middlewares/authMiddleWare’
Require stack: - /var/task/controllers/userController.js
- /var/task/routes/userRoutes.js
- /var/task/index.js
Did you forget to add it to “dependencies” inpackage.json
?
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
INIT_REPORT Init Duration: 1464.34 ms Phase: invoke Status: error Error Type: Runtime.ExitError
Unknown application error occurred