2 years ago
Tried bumping up to newer nixpacks version, regenerating pnpm lock, not sure what else to do as this looks like an error within nixpacks.
8 [stage-0 4/11] RUN nix-env -if .nixpacks/nixpkgs-655ba319013eacae89bd20aa5b793613c8baeefd.nix && nix-collect-garbage -d
8 32.20 installing '655ba319013eacae89bd20aa5b793613c8baeefd-env'
8 32.95 error:
8 32.95 … while calling the 'derivationStrict' builtin
8 32.95 at :9:12:
8 32.95 8|
8 32.95 9| strict = derivationStrict drvAttrs;
8 32.95 | ^
8 32.95 10|
8 32.95
8 32.95 … while evaluating derivation '655ba319013eacae89bd20aa5b793613c8baeefd-env'
8 32.95 whose name attribute is located at /nix/store/yw978rdlfb9pj3g9a6gx3kviybxg6f6v-source/pkgs/stdenv/generic/make-derivation.nix:331:7
8 32.95
8 32.95 … while evaluating attribute 'passAsFile' of derivation '655ba319013eacae89bd20aa5b793613c8baeefd-env'
8 32.95 at /nix/store/yw978rdlfb9pj3g9a6gx3kviybxg6f6v-source/pkgs/build-support/trivial-builders/default.nix:69:9:
8 32.95 68| inherit buildCommand name;
8 32.95 69| passAsFile = [ "buildCommand" ]
8 32.95 | ^
8 32.95 70| ++ (derivationArgs.passAsFile or [ ]);
8 32.95
8 32.95 (stack trace truncated; use '--show-trace' to show the full, detailed trace)
8 32.95
8 32.95 error: undefined variable 'nodejs_22'
8 32.95 at /app/.nixpacks/nixpkgs-655ba319013eacae89bd20aa5b793613c8baeefd.nix:19:9:
8 32.95 18| '')
8 32.95 19| nodejs22 openssl pnpm-8x
8 32.95 | ^
8 32.95 20| ];
8 ERROR: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-655ba319013eacae89bd20aa5b793613c8baeefd.nix && nix-collect-garbage -d" did not complete successfully: exit code: 1
> [stage-0 4/11] RUN nix-env -if .nixpacks/nixpkgs-655ba319013eacae89bd20aa5b793613c8baeefd.nix && nix-collect-garbage -d:
32.95 70| ++ (derivationArgs.passAsFile or [ ]);
32.95
32.95 (stack trace truncated; use '--show-trace' to show the full, detailed trace)
32.95
32.95 error: undefined variable 'nodejs_22'
32.95 at /app/.nixpacks/nixpkgs-655ba319013eacae89bd20aa5b793613c8baeefd.nix:19:9:
32.95 18| '')
32.95 19| nodejs22 openssl pnpm-8x
32.95 | ^
32.95 20| ];
> ⓘ Deployment information is only viewable by project members and Railway employees.
9 Replies
2 years ago
Hmm that is strange. I was able to build with node 22 no problem. Can you please try kicking off another build. I wonder if it was a network problem.
2 years ago
I've tried redeploying 7+ times at this point. You can see that this same nixpack commit hash works in the 'Dash' service if you look at the environment, but it fails with the "API" and "App" ones.
2 years ago
Can you please try setting the nixpacks version to the last version that worked https://docs.railway.app/reference/config-as-code#nixpacks-version
2 years ago
The builds started to fail randomly from nixpacks. I hadn't updated the version I was on for at least a month when the builds started to fail from this error. I updated the version to see if that would help, but it hasn't.
2 years ago
Tried adding nixpacksVersion = "1.24.0" to the nixpacks and it fails still. Same error.
2 years ago
Nixpacks was updated automatically which looks to have changed something with your build. On your previous working deploy it was using node 21 instead of 22. I think downgrading nixpacks or setting node version to something not 22 should fix the build.
Alternatively the team can investigate the build failure more deeply on Monday.
2 years ago
Oh I am trying to just use LTS. I'll try removing nixpkgsArchive and see if that helps. I thought setting that to a hash would lock it in for the specific version on that commit.
Status changed to Solved Railway • over 1 year ago
2 years ago
Removing nixpkgsArchive worked. Not sure why it is trying to use 22. Hope this ticket helps you guys find something interesting!
2 years ago
Ahh that makes sense then. Nixpacks was updated to support node 22 and that must not be included in the archive you had set. Glad it is resolved!