package.json: REST APIs, Discord bots, Express servers, Next.js (non-SSR builds), the lot. It auto-picks your package manager from the lockfile.
When it runs
There’s apackage.json at the repo root.
Package manager detection
Raypacks reads your lockfile to decide what to install with:
Commit your lockfile. Without it Raypacks falls back to npm.
Build steps
For every Node project:build script (a bare API or bot), only the install step runs.
Command overrides
Most projects need nothing here: Raypacks picks the install and build steps from your lockfile andpackage.json. For a project that doesn’t fit the defaults, a Frame exposes Install command and Build command overrides in Frame Settings, under Build. Set either one to replace the auto-detected step (for example a custom install flag, or a build script that isn’t named build); the build command runs after install. Leave them blank to let Raypacks pick.
Runtime
Your
start script is the contract Raypacks expects. Define one and the pack lights up:
package.json
Limits today
- No
engines.nodeenforcement (we shipnode:22-slimregardless). - Workspaces (
pnpm-workspace.yaml, npm workspaces) build everything but the root scripts run.
Common errors
App starts and exits immediately: yourstart script ran something that wasn’t a long-running server. Make sure it boots an HTTP listener.
Port mismatch: your app listens on process.env.PORT but you set the Frame port to something else. Read PORT from env, don’t hardcode.
Native modules fail to build: node:22-slim doesn’t include build toolchains. For now, prefer prebuilt binaries (better-sqlite3 with prebuilt, etc.) or switch to the Paketo builder.