Error: Cannot find module 'express'

Hello, i have a error while deploying my app on fly.io :

 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' ]
  }

i’m using this code in my toml file

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]
[build]
  builder = "paketobuildpacks/builder:base"
  buildpacks = ["gcr.io/paketo-buildpacks/nodejs"]
[[build.env]]
  name = "BP_NODE_RUN_SCRIPTS"
  value = "install"

but i can’t figure why it doesn’t work

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