Hello Dev Community,
I just finished deploying my node.js site on render and its giving me the following error :
[nodemon] 2.0.20
Dec 20 03:43:49 PM [nodemon] to restart at any time, enter rs
Dec 20 03:43:49 PM [nodemon] watching path(s): .
Dec 20 03:43:49 PM [nodemon] watching extensions: js,mjs,json
Dec 20 03:43:49 PM [nodemon] starting node index.js
Dec 20 03:43:59 PM internal/modules/cjs/loader.js:888
Dec 20 03:43:59 PM throw err;
Dec 20 03:43:59 PM ^
Dec 20 03:43:59 PM
Dec 20 03:43:59 PM Error: Cannot find module ‘…/server/models/WorkoutModel.js’
Dec 20 03:43:59 PM Require stack:
Dec 20 03:43:59 PM - /opt/render/project/src/index.js
Dec 20 03:43:59 PM at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
Dec 20 03:43:59 PM at Function.Module._load (internal/modules/cjs/loader.js:730:27)
Dec 20 03:43:59 PM at Module.require (internal/modules/cjs/loader.js:957:19)
Dec 20 03:43:59 PM at require (internal/modules/cjs/helpers.js:88:18)
Dec 20 03:43:59 PM at Object. (/opt/render/project/src/index.js:15:17)
Dec 20 03:43:59 PM at Module._compile (internal/modules/cjs/loader.js:1068:30)
Dec 20 03:43:59 PM at Object.Module._extensions…js (internal/modules/cjs/loader.js:1097:10)
Dec 20 03:43:59 PM at Module.load (internal/modules/cjs/loader.js:933:32)
Dec 20 03:43:59 PM at Function.Module._load (internal/modules/cjs/loader.js:774:14)
Dec 20 03:43:59 PM at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
Dec 20 03:43:59 PM code: ‘MODULE_NOT_FOUND’,
Dec 20 03:43:59 PM requireStack: [ ‘/opt/render/project/src/index.js’ ]
Dec 20 03:43:59 PM }
Dec 20 03:43:59 PM [nodemon] app crashed - waiting for file changes before starting…
A good help will be highly appreciated
Thanks
Kelvin