mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(relay): add root nixpacks.toml to install scripts/ deps on Railway (#1760)
Railway builds from repo root (root_dir=""), so scripts/nixpacks.toml is skipped. Root packages are installed via npm ci but scripts/package.json deps (@anthropic-ai/sdk, fast-xml-parser, etc.) never land in /app/node_modules, causing ERR_MODULE_NOT_FOUND at runtime. Add a root nixpacks.toml that: - Preserves existing scripts/nixpacks.toml settings (curl, NODE_OPTIONS) - Adds `npm install --prefix scripts` to the build phase so all scripts/package.json deps are installed alongside root deps
This commit is contained in:
17
nixpacks.toml
Normal file
17
nixpacks.toml
Normal file
@@ -0,0 +1,17 @@
|
||||
# Railway relay build config (root_dir="" — builds from repo root).
|
||||
# Promotes scripts/nixpacks.toml settings here since nixpacks only reads
|
||||
# config from the build root. Adds scripts/ dep install so that packages
|
||||
# in scripts/package.json (e.g. @anthropic-ai/sdk, fast-xml-parser) are
|
||||
# available at runtime when node scripts/ais-relay.cjs is started.
|
||||
|
||||
[phases.setup]
|
||||
aptPkgs = ["curl"]
|
||||
|
||||
[variables]
|
||||
NODE_OPTIONS = "--dns-result-order=ipv4first"
|
||||
|
||||
[phases.install]
|
||||
cmds = ["npm ci"]
|
||||
|
||||
[phases.build]
|
||||
cmds = ["npm install", "npm install --prefix scripts"]
|
||||
Reference in New Issue
Block a user