Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh Example Fails to Build + deno.lock version 4 unsupported #18

Open
A1029384756 opened this issue Dec 18, 2024 · 1 comment
Open

Comments

@A1029384756
Copy link

Was looking at using this to package a Fresh website I wrote. Initially I attempted to package it via the example flake. Once that failed, I tried the example but got a hash error on a dependency.

warning: Git tree '/home/haydengray/Documents/nix-deno' is dirty
these 4 derivations will be built:
  /nix/store/1srlqvwk7iwwlsl57llm4d6kkg012af5-esm.sh--preact-signals-core-1.5.0.drv
  /nix/store/ki376hd0vhz5kd87sfh627hc7ac5rbdq-deno_prefetch.drv
  /nix/store/ans55jdaf81yfdnx4wi2lsr80x5ka503-deno_dir.drv
  /nix/store/6n3pdxl8wx2hri0h9526zfs158plwqfp-example-executable.drv
building '/nix/store/1srlqvwk7iwwlsl57llm4d6kkg012af5-esm.sh--preact-signals-core-1.5.0.drv'...
error: hash mismatch in fixed-output derivation '/nix/store/1srlqvwk7iwwlsl57llm4d6kkg012af5-esm.sh--preact-signals-core-1.5.0.drv':
         specified: sha256-XbfUHgodUglgIZHQXM5GcwgBvqGLTDJAyaOfHUIK8zs=
            got:    sha256-bG0ToK4/weMvfdheMnOBs9zoLXcOinGP4pfuXwLHsv8=
error: 1 dependencies of derivation '/nix/store/ki376hd0vhz5kd87sfh627hc7ac5rbdq-deno_prefetch.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ans55jdaf81yfdnx4wi2lsr80x5ka503-deno_dir.drv' failed to build
error: 1 dependencies of derivation '/nix/store/6n3pdxl8wx2hri0h9526zfs158plwqfp-example-executable.drv' failed to build

After updating the lockfile using the latest version of Deno (2.1.4 at this time) I saw that npm would have issues because of Deno changing to lockfile v4. To get around this, I updated the source with:

(if denoLock.version == 3 then denoLock.packages.npm or { } else if denoLock.version == 4 then denoLock.npm or { } else throw "unsupported lockfile version")

After doing this, the npm deps worked, but I get this error:

warning: Git tree '/home/haydengray/Documents/nix-deno' is dirty
this derivation will be built:
  /nix/store/alsygs6wpj068b54bck704sxn5q21as1-example-executable.drv
building '/nix/store/alsygs6wpj068b54bck704sxn5q21as1-example-executable.drv'...
error: builder for '/nix/store/alsygs6wpj068b54bck704sxn5q21as1-example-executable.drv' failed with exit code 1;
       last 18 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/hdpik6d137ir1bdszdlxfbac3il50wdh-fresh
       > source root is fresh
       > Executing denoRestoreCacheHook
       > Finished denoRestoreCacheHook
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Running phase: buildPhase
       > Download https://deno.land/[email protected]/dotenv/load.ts
       > Download https://deno.land/x/[email protected]/server.ts
       > Download https://esm.sh/[email protected]/jsx-runtime
       > Download https://deno.land/x/[email protected]/runtime.ts
       > Download https://esm.sh/*@preact/[email protected]
       > Download https://esm.sh/[email protected]
       > error: Import 'https://deno.land/[email protected]/dotenv/load.ts' failed: error sending request for url (https://deno.land/[email protected]/dotenv/load.ts): client error (Connect): dns error: failed to lookup address information: Temporary failure in name resolution: failed to lookup address information: Temporary failure in name resolution
       >     at file:///build/fresh/main.ts:7:8
       For full logs, run 'nix log /nix/store/alsygs6wpj068b54bck704sxn5q21as1-example-executable.drv'.

When looking in the generated lockfile however, this is listed under remotes and I also see this in the nix store:
/nix/store/ikbva52xykkwfnrfny0icy2da762qhhd-deno.land-std-0.208.0-dotenv-load.ts

Is there anything I am missing?

@A1029384756
Copy link
Author

As additional info, this issue also seems to be present on the remote example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant