Error: Cannot find module 'express' while deploying on

when i try to deploy my app on my server, i get this error :

Error: Cannot find module 'express'
  Require stack:
  - /workspace/index.js
      at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
      at Module._load (node:internal/modules/cjs/loader:922:27)
      at Module.require (node:internal/modules/cjs/loader:1143:19)
      at require (node:internal/modules/cjs/helpers:110:18)
      at Object.<anonymous> (/workspace/index.js:1:17)
      at Module._compile (node:internal/modules/cjs/loader:1256:14)
      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
      at Module.load (node:internal/modules/cjs/loader:1119:32)
      at Module._load (node:internal/modules/cjs/loader:960:12)
      at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/workspace/index.js' ]
  Node.js v18.16.1

I tried to build and push my app with a lot of different builder and buildpack, but for the moment i use this code in my fly.toml file.

  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]
  builder = "paketobuildpacks/builder:base"
  buildpacks = [""]
  value = "install"

i just use this to deploy my server, i don’t have any docker file

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