Once I press ‘Deploy Latest Commit’ the deployment starts.
All goes well (Part1.png) until it tries to start the server which follows an error (Part2.png) that I do not know how to solve.
Note: I would like to add that running the server in VS Code works perfectly. But not here on Render.
Feb 8 03:58:22 PM [nodemon] 2.0.20
Feb 8 03:58:22 PM [nodemon] to restart at any time, enter rs
Feb 8 03:58:22 PM [nodemon] watching path(s): .
Feb 8 03:58:22 PM [nodemon] watching extensions: js,mjs,json
Feb 8 03:58:22 PM [nodemon] starting node index index.js
Feb 8 03:58:24 PM internal/process/esm_loader.js:74
Feb 8 03:58:24 PM internalBinding(‘errors’).triggerUncaughtException(
Feb 8 03:58:24 PM ^
Feb 8 03:58:24 PM
Feb 8 03:58:24 PM Error [ERR_MODULE_NOT_FOUND]: Cannot find module ‘/opt/render/project/src/server/mongodb/models/post.js’ imported from /opt/render/project/src/server/routes/postRoutes.js
Feb 8 03:58:24 PM at finalizeResolution (internal/modules/esm/resolve.js:276:11)
Feb 8 03:58:24 PM at moduleResolve (internal/modules/esm/resolve.js:699:10)
Feb 8 03:58:24 PM at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:810:11)
Feb 8 03:58:24 PM at Loader.resolve (internal/modules/esm/loader.js:88:40)
Feb 8 03:58:24 PM at Loader.getModuleJob (internal/modules/esm/loader.js:241:28)
Feb 8 03:58:24 PM at ModuleWrap. (internal/modules/esm/module_job.js:56:40)
Feb 8 03:58:24 PM at link (internal/modules/esm/module_job.js:55:36) {
Feb 8 03:58:24 PM code: ‘ERR_MODULE_NOT_FOUND’
Feb 8 03:58:24 PM }
Feb 8 03:58:24 PM [nodemon] app crashed - waiting for file changes before starting…