Hello I am new to Render.My backend code works perfectly in local but error in deployment Any help is appreciated. Thanks in advance


There will always be differences between environments: development mode/Local, production mode/Render, etc. These differences need to be considered and configured as required for your own app in each environment.

You may be traversing too high up the folder structure.

/opt/render/project/src/ is where your repo is downloaded too.

And index.js is being run from there:

INFO- /opt/render/project/src/index.js

But the error shows it’s trying to look for a file a level higher (../):


Which would be looking outside of the folder where you code is download. (/opt/render/project/catero-server/api/middleware/). If the catero-server folder is also in the root of your repo, it would likely be referenced with a single period: ./catero-server/api/middleware/verifyToken

Also, be aware that Render Native Runtimes use Linux with a case-sensitive filesystem. So file references in your code need to match the casing of the file path exactly.


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