MERN project deployment fails (server side)

Hello, I try to deploy the server side of my MERN project. Deployment fails. It looks like start.js cannot be found, but this should be provided by the production runtime renvironment, I have no start.js in my code!? Here is the error log:

Error: Cannot find module '/opt/render/project/src/start.js'
Oct 28 09:08:14 PM      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
Oct 28 09:08:14 PM      at Function.Module._load (node:internal/modules/cjs/loader:778:27)
Oct 28 09:08:14 PM      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Oct 28 09:08:14 PM      at node:internal/main/run_main_module:17:47 {
Oct 28 09:08:14 PM    code: 'MODULE_NOT_FOUND',
Oct 28 09:08:14 PM    requireStack: []

My package.json looks like that:

  "name": "webshop",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node start.js",
    "dev": "nodemon start.js"
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.1",
    "cookie-parser": "^1.4.6",
    "cors": "^2.8.5",
    "dotenv": "^16.0.0",
    "express": "^4.17.2",
    "express-jwt": "^6.1.0",
    "express-validator": "^5.3.1",
    "formidable": "^2.0.1",
    "jsonwebtoken": "^8.5.1",
    "lodash": "^4.17.21",
    "mongoose": "^6.2.1",
    "morgan": "^1.10.0",
    "nodemon": "^2.0.15",
    "uuid": "^8.3.2"

Node version is 16.13.1 (I set the env NODE_VERSION to 16.13.1 )


Deployment works, I use of course, “start” : “node index.js”, now however - how I expected it - the APIs do not work.

Hi there,

Please check your service logs from the Logs tab of your service. You should see the issue if you look at this.


Render Support, UTC+10 :australia:

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