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

Build failure: wrangler #265653

Closed
iivvaannxx opened this issue Nov 5, 2023 · 10 comments · Fixed by #286746
Closed

Build failure: wrangler #265653

iivvaannxx opened this issue Nov 5, 2023 · 10 comments · Fixed by #286746
Labels
0.kind: build failure A package fails to build

Comments

@iivvaannxx
Copy link

Steps To Reproduce

Steps to reproduce the behavior:

  1. Try to install any of the wrangler packages. Either be wrangler or nodePackages.wrangler. In my case I tried nix shell nixpkgs#wrangler
  2. The build fails while trying to install the package "@cloudflare/workerd-linux-64".

Build log

I am attaching the last 10 log lines of the build error, but I also created a gist with the full logs of the derivation.

error: builder for '/nix/store/lxk2q4j1wkry2sr4p1ap98x2k9bdwlbz-wrangler-3.15.0.drv' failed with exit code 1;
       last 10 log lines:
       > npm ERR!               ^
       > npm ERR!
       > npm ERR! Error: Failed to install package "@cloudflare/workerd-linux-64"
       > npm ERR!     at checkAndPreparePackage (/nix/store/6prn9amlmw1455jyy6k9z031ixn33xcp-wrangler-3.15.0/lib/node_modules/wrangler/node_modules/workerd/install.js:242:15)
       > npm ERR!     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
       > npm ERR!
       > npm ERR! Node.js v18.18.2
       > 
       > npm ERR! A complete log of this run can be found in: /build/.npm/_logs/2023-11-05T12_36_49_991Z-debug-0.log

Additional context

If you try to install it globally using any package manager like npm or pnpm it works. But when I went to try it on a simple fresh worker template it fails to start on wrangler dev with the following error:

Error: spawn /home/iivvaannxx/.../node_modules/@cloudflare/workerd-linux-64/bin/workerd ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/iivvaannxx/.../node_modules/@cloudflare/workerd-linux-64/bin/workerd',
  path: '/home/iivvaannxx/.../node_modules/@cloudflare/workerd-linux-64/bin/workerd',
  spawnargs: [
    'serve',
    '--binary',
    '--experimental',
    '--socket-addr=entry=127.0.0.1:3001',
    '--external-addr=loopback=localhost:36063',
    '--control-fd=3',
    '-',
    '--inspector-addr=localhost:43659'
  ]
}

Notify maintainers

I am not sure if nodePackages have maintainers at all (at least they aren't listed in the search results), but I found @Br1ght0ne to be a maintainer of the older wrangler_1 CLI so not sure if he will be able to help.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.1.59, NixOS, 23.05 (Stoat), 23.05.20231021.5550a85`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.13.6`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@iivvaannxx iivvaannxx added the 0.kind: build failure A package fails to build label Nov 5, 2023
@zestsystem
Copy link
Contributor

Ran into the same issue as well.

@lilyinstarlight
Copy link
Member

cc'ing @cyntheticfox who originally added this derivation

It might just be time to migrate this package to buildNpmPackage-based tooling instead of leaving it in the nodePackages set that we would very much like to deprecate

@Kranzes
Copy link
Member

Kranzes commented Nov 9, 2023

I can do that, this package is very crucial.

@cyntheticfox
Copy link
Contributor

I wish I had my laptop on me. I'm all for it, but might not get to it until tonight, so if someone else can do so quickly (dont forget some of what was in overrides.nix and test it), go ahead

@Kranzes
Copy link
Member

Kranzes commented Nov 9, 2023

It's a bit tricky because they don't have a package-lock.json, they use a pnpm-lock.yaml

@Kranzes
Copy link
Member

Kranzes commented Nov 9, 2023

Started working on it here -> #266517

@TonyGiorgio
Copy link

I'm also facing this. Any work arounds that exist for it?

@Kranzes
Copy link
Member

Kranzes commented Nov 20, 2023

Not really...
I just pointed it to an old version like so

(builtins.getFlake "github:NixOS/nixpkgs/8dfad603247387df1df4826b8bea58efc5d012d8").legacyPackages.${pkgs.system}.nodePackages.wrangler

@TonyGiorgio
Copy link

Pointed to the old version as well and that works for me, thank you!

@cyntheticfox
Copy link
Contributor

Guess we really need #231513 to get this fixed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants