bun not found at runtime

hiya, bun isn't found at runtime (start command throws a command not found error) and i can't figure out why. are there any problems with my railpack config?

{
  "$schema": "https://schema.railpack.com",
  "buildAptPackages": ["build-essential python3"],
  "provider": "node",
  "packages": {
    "node": "20",
    "bun": "1.2.9"
  },
  "caches": {
    "bun-install": {
      "directory": "/root/.bun/install/cache",
      "type": "shared"
    },
    "node-modules": {
      "directory": "/app/node_modules/.cache",
      "type": "shared"
    },
    "turbo-repo": {
      "directory": "/app/.turbo/cache",
      "type": "shared"
    }
  },
  "steps": {
    "copy": {
      "inputs": [{ "step": "packages:mise" }],
      "commands": [
        { "src": "apps/bot", "dest": "apps/bot" },
        { "src": "packages", "dest": "packages" },
        { "src": "scripts", "dest": "scripts" },
        { "src": "bun.lock", "dest": "bun.lock" },
        { "src": "bunfig.toml", "dest": "bunfig.toml" },
        { "src": "package.json", "dest": "package.json" },
        { "src": "turbo.json", "dest": "turbo.json" }
      ]
    },
    "install": {
      "caches": ["bun-install"],
      "inputs": [{ "step": "copy" }],
      "commands": [{ "path": "node_modules/.bin" }, { "cmd": "bun install" }],
      "variables": {
        "CI": "true",
        "NODE_ENV": "production"
      }
    },
    "build": {
      "caches": ["node-modules", "turbo-repo"],
      "inputs": [{ "step": "install" }],
      "commands": [{ "cmd": "bun run build:bot" }],
      "secrets": ["*"]
    }
  },
  "deploy": {
    "inputs": [{ "step": "build" }],
    "startCommand": "bun run start:bot"
  }
}```

2 Replies

N/A


including the mise step fixed it

{
  "deploy": {
    "inputs": [
      {
        "step": "packages:mise",
        "include": [
          "/mise/shims",
          "/mise/installs",
          "/usr/local/bin/mise",
          "/etc/mise/config.toml",
          "/root/.local/state/mise"
        ]
      },
      {
        "step": "build",
        "include": ["."]
      }
    ],
    "startCommand": "bun run start:bot"
  }
}```


Welcome!

Sign in to your Railway account to join the conversation.

Loading...