while deploying the Node.js backend app i got this error
but my localhost is working absolutely without any warnings and errors.
Require stack:
- /opt/render/project/src/server.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/opt/render/project/src/server.js:8:20)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensionsā¦js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: āMODULE_NOT_FOUNDā,
equireStack: [ ā/opt/render/project/src/server.jsā ]
}
Hi there,
Generally Node MODULE_NOT_FOUND
errors pop up because of one of two issues:
- A required package is not specified in the
package.json
file
-
npm install
is not included in the Build Command (via your serviceās āSettingsā page)
If you are still having issues after looking into these suggestions, please let us know.
Regards,
Mike
1 Like
Hi! @mike.marinaro I am having the same issue, and have looked into both those solutions, (even including devDependencies in my dependencies, incase that caused it).
My build command is ānpm installā as well
Here is the github repo: GitHub - pjtalbot/Dungeons-and-Dragons-5e-condition-tracker
This is a node - express stack
Hi there,
Are you still having any issues with this? It looks like your services are live at the moment. If you have further questions I recommend reaching out to us privately via the Render Dashboard and selecting the service that is impacted so we can best assist you.
Regards,
Mike