2 years ago
I tried builder v2 and seems like it ignore nixpacksPlan#phases#npm:config commands?
10 Replies
2 years ago
652b6038-5926-4167-a8fe-58e7d85c2888
2 years ago
Please share an example nixpacks.toml file
2 years ago
{
"$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
}
}2 years ago
ah this was in a railway.json, my bad
2 years ago
can you send your build logs that use the v2 builder please -
2 years ago
2 years ago
and just for clarity this all works on the legacy builder and your custom phase shows up in the build table?
2 years ago
yes, for v1. i can see there are npm config command runs after COPY . /app/.

2 years ago
okay, thank you very much I will forward this thread to the developer that is working on the v2 builder
2 years ago
Oh thisif rom today?