Cannot find module '/app/server'

This is my first time using glitch and node.js. I made my web app and I am ready to deploy it. After importing my github link and trying to get my app to show on glitch, it times out. What’s strange is that the app works in localhost so I would’ve assumed any coding error would’ve been caught. When I look at the glitch error, I see:

internal/modules/cjs/loader.js:638

Error: Cannot find module ‘/app/server’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Link to my project: Glitch :・゚✧

Hi itshendson, welcome to the forum :slight_smile:

Your start command is node server, and node can’t figure out that the file you meant was src/server.js.

So, simply change your start command in package.json to:

"start": "node src/server.js",

You might also wish to specify a node version, otherwise Glitch will use Node 10. Add something like this to your package.json:

  "engines": {
    "node": "14.x"
  },

Hope this helps!

Ste