Skip to content

Devbox unable to detect version #2766

@Electrenator

Description

@Electrenator

What happened?

Devbox does not start its shell and with package /nix/store/p1f8y878k8zxcqzl8ll0mkm8v0bbyrhk-devbox-0.16.0/bin/devbox as ran binary in the environment. Haven't used the devbox tool before, so there should not be any configuration to clear out.

Nix shell is running in a multi-user setup installed a few months ago using their on site mentioned installation script.

nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' --version --debug

nix (Nix) 2.33pre20251107_479b6b73
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/space-dragon/.config/nix/nix.conf:/home/space-dragon/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf:/usr/share/manjaro-kde-settings/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/dqnsgvw7yzz8ar5l31lyp35kglnzwf98-nix-store-2.33pre20251107_479b6b73/share

Steps to reproduce

  1. mkdir test-directory
  2. cd test-directory
  3. devbox init
  4. devbox shell

It then shows:

Error: Devbox requires nix of version >= 2.12.0. Your version is . Please upgrade nix and try again.

Command

shell

devbox.json

{
    "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
    "packages": [],
    "shell": {
      "init_hook": [
        "echo 'Welcome to devbox!' > /dev/null"
      ],
      "scripts": {
        "test": [
          "echo \"Error: no test specified\" && exit 1"
        ]
      }
    }
  }

Devbox version

0.16.0

Nix version

nix (Nix) 2.33pre20251107_479b6b73

What system does this bug occur on?

Linux (x86-64)

Debug logs

time=2026-01-19T17:52:39.935+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2026-01-19T17:52:39.935+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2026-01-19T17:52:39.936+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/home/space-dragon/test/devbox.json dur=221.887µs
time=2026-01-19T17:52:39.936+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2026-01-19T17:52:39.936+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2026-01-19T17:52:39.936+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/home/space-dragon/test/devbox.json dur=64.254µs
time=2026-01-19T17:52:39.936+01:00 level=DEBUG source=go.jetify.com/devbox/nix/nix.go:143 msg="nix command starting" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' --version --debug"
time=2026-01-19T17:52:39.958+01:00 level=DEBUG source=go.jetify.com/devbox/nix/nix.go:143 msg="nix command exited" cmd.args="nix --extra-experimental-features ca-derivations --option experimental-features 'nix-command flakes fetch-closure' --version --debug" cmd.path=/home/space-dragon/.nix-profile/bin/nix cmd.pid=266264 cmd.code=0 cmd.dur=21.709915ms

Error: Devbox requires nix of version >= 2.12.0. Your version is . Please upgrade nix and try again.


time=2026-01-19T17:52:39.958+01:00 level=ERROR source=go.jetify.com/devbox/internal/boxcli/midcobra/debug.go:70 msg="command error" execid=4a663096655e4a33a44c1073d7625f4b stack="Devbox requires nix of version >= 2.12.0. Your version is . Please upgrade nix and try again.\n\ngo.jetify.com/devbox/internal/boxcli/usererr.New\n\tgo.jetify.com/devbox/internal/boxcli/usererr/usererr.go:30\ngo.jetify.com/devbox/internal/nix.EnsureNixInstalled.func1\n\tgo.jetify.com/devbox/internal/nix/install.go:48\ngo.jetify.com/devbox/internal/nix.EnsureNixInstalled\n\tgo.jetify.com/devbox/internal/nix/install.go:59\ngo.jetify.com/devbox/internal/boxcli.ensureNixInstalled\n\tgo.jetify.com/devbox/internal/boxcli/setup.go:56\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.9.1/command.go:1000\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.9.1/command.go:1148\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.9.1/command.go:1071\ngo.jetify.com/devbox/internal/boxcli/midcobra.(*midcobraExecutable).Execute\n\tgo.jetify.com/devbox/internal/boxcli/midcobra/midcobra.go:61\ngo.jetify.com/devbox/internal/boxcli.Execute\n\tgo.jetify.com/devbox/internal/boxcli/root.go:113\ngo.jetify.com/devbox/internal/boxcli.Main\n\tgo.jetify.com/devbox/internal/boxcli/root.go:132\nmain.main\n\tgo.jetify.com/devbox/cmd/devbox/main.go:11\nruntime.main\n\truntime/proc.go:283\nruntime.goexit\n\truntime/asm_amd64.s:1700"
time=2026-01-19T17:52:39.958+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:126 msg="searching for config file (including parent directories)" path=.
time=2026-01-19T17:52:39.958+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:147 msg="trying config file" path=devbox.json
time=2026-01-19T17:52:39.958+01:00 level=DEBUG source=go.jetify.com/devbox/internal/devconfig/config.go:134 msg="config file found" path=/home/space-dragon/test/devbox.json dur=178.376µs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageIssue needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions