error: attribute 'dev' missing - Nixpack
hotcakessanderson
HOBBYOP

a year ago

Description of the Issue:

This is a django app I haven't updated in a year. I am working on updating everything and continuing development.

I think there is an issue with the version of nixpacks I am using or the way I have nixpacks set up in my files. I had not been using a railway.json file in the past with no issue but may need one?

Related discussions:

From other discussions I need to change a variable name or change the nixpacks version I am using? I could not figure out a clear solution.

https://help.railway.com/questions/error-attribute-dev-missing-this-w-34053210

https://help.railway.com/questions/error-while-trying-to-build-my-applicati-d91fcf23

https://docs.railway.com/reference/config-as-code#nixpacks-version

Appreciate the help and clarification

Complete log:

context: 0d0b6a4106b9dbcf5e845ff887e06788

╔══════════════════════════════ Nixpacks v1.31.0 ══════════════════════════════╗

║ setup │ python37, postgresql_16.dev, gcc ║

║──────────────────────────────────────────────────────────────────────────────║

║ install │ python -m venv --copies /opt/venv && . /opt/venv/bin/activate ║

║ │ && pip install -r requirements.txt ║

║──────────────────────────────────────────────────────────────────────────────║

║ start │ gunicorn foodetc.wsgi --log-file - --timeout 600 ║

╚══════════════════════════════════════════════════════════════════════════════╝

[internal] load build definition from Dockerfile

[internal] load build definition from Dockerfile

[internal] load build definition from Dockerfile

[internal] load build definition from Dockerfile

[internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1736208272

[internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1736208272

[internal] load .dockerignore

[internal] load .dockerignore

[internal] load .dockerignore

[internal] load .dockerignore

[internal] load build context

[internal] load build context

[internal] load build context

[stage-0 2/8] WORKDIR /app/

[stage-0 3/8] COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix

[stage-0 3/8] COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix

[stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d

unpacking 'https://github.com/NixOS/nixpkgs/archive/5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.tar.gz'; into the Git cache...

installing '5148520bfab61f99fd25fb9ff7bfbb50dad3c9db-env'

error:

… while calling the 'derivationStrict' builtin

at <nix/derivation-internal.nix>:34:12:

33|

34| strict = derivationStrict drvAttrs;

| ^

35|

… while evaluating derivation '5148520bfab61f99fd25fb9ff7bfbb50dad3c9db-env'

whose name attribute is located at /nix/store/lgcjj6s23v2203zyihsd0j26wh1saj0c-source/pkgs/stdenv/generic/make-derivation.nix:300:7

… while evaluating attribute 'passAsFile' of derivation '5148520bfab61f99fd25fb9ff7bfbb50dad3c9db-env'

at /nix/store/lgcjj6s23v2203zyihsd0j26wh1saj0c-source/pkgs/build-support/trivial-builders/default.nix:88:7:

87| inherit buildCommand name;

88| passAsFile = [ "buildCommand" ]

| ^

89| ++ (derivationArgs.passAsFile or []);

(stack trace truncated; use '--show-trace' to show the full, detailed trace)

error: attribute 'dev' missing

at /app/.nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix:19:13:

18| '')

19| gcc postgresql_16.dev python37

| ^

20| ];

Did you mean doc?

[stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d

Dockerfile:8

-------------------

6 |

7 | COPY .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix

8 | >>> RUN nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d

9 |

10 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.nix && nix-collect-garbage -d" did not complete successfully: exit code: 1

Error: Docker build failed

Solved

3 Replies

a year ago

Hello,

Tried some things, but it's ultimately failing since you have set your runtime.txt file to an unsupported 3.7 version, please try to delete your runtime.txt file so that a default version can be used, or update it to a supported version.

https://nixpacks.com/docs/providers/python

Best,
Brody


Status changed to Awaiting User Response Railway about 1 year ago


hotcakessanderson
HOBBYOP

a year ago

I had tried updating the python version in the runtime.txt to 3.8 too. But, I guess that wasn't good enough. So I have no runtime.txt or railway.json atm in my djano project now.

You created 2 variables for me thank you.

NIXPACKS_PYTHON_VERSION 3.8

NIXPACKS_VERSION 1.21.3

It was able to deploy, Chef Kiss Brody. I appreciate the quick response.


Status changed to Awaiting Railway Response Railway about 1 year ago


a year ago

Happy to help!


Status changed to Awaiting User Response Railway about 1 year ago


Status changed to Solved brody about 1 year ago


Loading...