Module not found error while deployment

The error says:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module ‘/opt/render/project/server/routes/posts.js’ imported from /opt/render/project/src/index.js

Here is my github repo: GitHub - imronakk/memory-backend


It looks like you’re referencing a file too far up the path. Render will clone your repo into /opt/render/project/src/.

The “imported from” files shows the it’s being read is index.js in the root of your repo:


But the file being referenced doesn’t contain the src folder:


Which would appear to traverse too high up the path.

Also, the repo you linked is either private or deleted.


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