RAILWAY_BETA_ENABLE_BUILD_V2 not respect nixpacksPlan#phases commands?

I tried builder v2 and seems like it ignore nixpacksPlan#phases#npm:config commands?

0 Replies

652b6038-5926-4167-a8fe-58e7d85c2888


brody
EMPLOYEE

a year ago

Please share an example nixpacks.toml file


{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "builder": "NIXPACKS",
    "buildCommand": "pnpm run build",
    "watchPatterns": [
      "apps/backend/src/*",
      "apps/backend/railway.json",
      "packages/**/src/*",
      "packages/**/package.json",
      "package.json",
      "pnpm-workspace.yaml",
      "pnpm-lock.yaml"
    ],
    "nixpacksPlan": {
      "phases": {
        "npm:config": {
          "dependsOn": ["setup"],
          "cmds": [
            "npm config set @repo:registry https://npm.repo.com",
            "npm config set //npm.repo.com/:_authToken=${NPM_TOKEN_REPO}"
          ]
        },
        "install": {
          "dependsOn": ["setup", "npm:config"]
        }
      }
    }
  },
  "deploy": {
    "numReplicas": 1,
    "startCommand": "pnpm --filter=backend run start",
    "healthcheckPath": "/health",
    "healthcheckTimeout": 10,
    "sleepApplication": false,
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 10
  }
}

brody
EMPLOYEE

a year ago

ah this was in a railway.json, my bad


brody
EMPLOYEE

a year ago

can you send your build logs that use the v2 builder please -



brody
EMPLOYEE

a year ago

and just for clarity this all works on the legacy builder and your custom phase shows up in the build table?


yes, for v1. i can see there are npm config command runs after COPY . /app/.

1250141509710385400


brody
EMPLOYEE

a year ago

okay, thank you very much I will forward this thread to the developer that is working on the v2 builder


Oh thisif rom today?


Loading...