Need help Fast! fail deploy server Typescript & Express!

Error: Cannot find module ‘/opt/render/project/src/dist/server.js’

Dec 7 03:53:26 PM at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)

Dec 7 03:53:26 PM at Module._load (node:internal/modules/cjs/loader:901:27)

Dec 7 03:53:26 PM at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)

Dec 7 03:53:26 PM at node:internal/main/run_main_module:23:47 {

Dec 7 03:53:26 PM code: ‘MODULE_NOT_FOUND’,

Dec 7 03:53:26 PM requireStack:

Dec 7 03:53:26 PM}

Dec 7 03:53:26 PM

Dec 7 03:53:26 PMNode.js v20.9.0

this is the problem

this is my scripts:
“scripts”: {
“start”: “node dist/server.js”,
“build”: “npm i”,
“test”: “echo "Error: no test specified" && exit 1”

what should i do?


The “dist” in the module path implies that some may need to be built. Does your code require a build script? Have you run it?


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