How Can I Fix My Nixpacks Build?

Project ID: 26297924-d91d-448c-b1fa-e00612d55795 I am trying to use nixpacks build for my Django app and am running into some problems: Command I am Running
sudo nixpacks build /mnt/c/Users/username/source/repos/django_project/ --name django-project
sudo nixpacks build /mnt/c/Users/username/source/repos/django_project/ --name django-project
Error Message(s)
=> ERROR [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-co 54.7s
------
> [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-collect-garbage -d:
#8 10.36 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 325 ms
#8 20.69 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 503 ms
#8 31.21 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 1375 ms
#8 42.59 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 2025 ms
#8 54.63 error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6)
#8 54.63 (use '--show-trace' to show detailed location information)
------
executor failed running [/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-collect-garbage -d]: exit code: 1
Error: Docker build failed
=> ERROR [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-co 54.7s
------
> [stage-0 4/8] RUN nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-collect-garbage -d:
#8 10.36 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 325 ms
#8 20.69 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 503 ms
#8 31.21 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 1375 ms
#8 42.59 warning: error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6); retrying in 2025 ms
#8 54.63 error: unable to download 'https://github.com/NixOS/nixpkgs/archive/a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.tar.gz': Couldn't resolve host name (6)
#8 54.63 (use '--show-trace' to show detailed location information)
------
executor failed running [/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-a0b7e70db7a55088d3de0cc370a59f9fbcc906c3.nix && nix-collect-garbage -d]: exit code: 1
Error: Docker build failed
I am using WSL 2 (Windows Ubuntu Subsystem) with Docker working. I am still wondering if Docker has something to do with this or there are some issues with Ubuntu connecting to the internet. How should I begin debugging this?
4 Replies
Percy
Percy2y ago
Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.
Percy
Percy2y ago
It appears that the issue is related to the Nixpacks build not being able to download the NixOS/nixpkgs archive from GitHub. You may need to check your internet connection and ensure that you have the correct permissions to access the archive.
⚠️ experimental feature
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
echoesembrace
echoesembraceOP2y ago
Thank you for the Stack Overflow link! That helped because I needed to find solutions for getting WSL to connect to the internet. I ended up just building my project on Railway using NIXPACKS variables.
Want results from more Discord servers?
Add your server