Cannot find module cors

Earlier I was getting CORS error, so I did some changes to the backend and below it is after changes:


Now after deploying the code on render from latest commit, I am getting error: Error: Cannot find module ‘cors’
Please help me with these.

The most likely cause of this issue is that you moved the cors package into devDependencies, or perhaps deleted it from your package.json entirely. The app code itself is not relevant here.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.