NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.98k stars 13.99k forks source link

Build failure: code-server #286166

Open chunjiw opened 8 months ago

chunjiw commented 8 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build code-server

Build log

error: builder for '/nix/store/d77dl41r3kk6qk31sl1gnzvjp3r0g1h2-code-server-4.19.1.drv' failed with exit code 1;
       last 10 log lines:
       > [22:08:27] Finished compile-api-proposal-names after 149 ms
       > [22:08:27] Starting compile-src ...
       > [22:08:46] [mangler] Done collecting. Classes: 7143. Exported symbols: 8704
       > [22:08:48] [mangler] Done creating class replacements
       > [22:08:48] [mangler] Starting prepare rename edits
       > [22:08:49] Starting compilation...
       > error Command failed with signal "SIGKILL".
       > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
       > error Command failed with exit code 1.
       > info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
       For full logs, run 'nix log /nix/store/d77dl41r3kk6qk31sl1gnzvjp3r0g1h2-code-server-4.19.1.drv'.
error: 1 dependencies of derivation '/nix/store/bfqswn8r1h60jdd4fxix0kn00g3v1hgw-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x952qxri8pixzmsji2cd89hlb4xgd482-nixos-system-nixplay-24.05.20240131.b8b232a.drv' failed to build

Additional context

I'm using flake unstable channel

Notify maintainers

@drupol

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"
this path will be fetched (0.01 MiB download, 0.05 MiB unpacked):
  /nix/store/wr08yanv2bjrphhi5aai12hf2qz5kvic-stdenv-linux
copying path '/nix/store/wr08yanv2bjrphhi5aai12hf2qz5kvic-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.69, NixOS, 23.11 (Tapir), 23.11.20240124.a77ab16`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

drupol commented 8 months ago

Is it behaving the same with version 4.20.1 ?

chunjiw commented 8 months ago

I'm sorry, I just started my nix journey, don't really know how to change version. I simply put code-server in systemPackages. Can you briefly tell me how to change version, or point me to relevant docs? Thank you!

Aleksanaa commented 8 months ago

Looks a bit like the build command was oomed. Can you take a look at the memory usage during the build?

chunjiw commented 8 months ago

Thank you for the suggestion, I have 8GB ram in the VM, indeed it seems not enough, memory usage can be as high as 7.3 GB during build. I doubled the RAM, but then I got another error during build:

error: builder for '/nix/store/d77dl41r3kk6qk31sl1gnzvjp3r0g1h2-code-server-4.19.1.drv' failed with exit code 1;
       last 10 log lines:
       > warning npm-shrinkwrap.json found. This will not be updated or respected. See https://yarnpkg.com/en/docs/migrating-from-npm for more information.
       > [1/4] Resolving packages...
       > error An unexpected error occurred: "https://registry.yarnpkg.com/@microsoft%2f1ds-core-js: getaddrinfo EAI_AGAIN registry.yarnpkg.com".
       > info If you think this is a bug, please open a bug report with the information provided in "/nix/store/2dh9n6z77aimxf41s540lmjgczi84vy8-code-server-4.19.1/libexec/code-server/lib/vscode/yarn-error.log".
       > info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
       > You may not have the required dependencies to build the native modules.
       > Please see https://github.com/coder/code-server/blob/main/docs/npm.md
       > error Command failed with exit code 1.
       > info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
       > 
       For full logs, run 'nix log /nix/store/d77dl41r3kk6qk31sl1gnzvjp3r0g1h2-code-server-4.19.1.drv'.
error: 1 dependencies of derivation '/nix/store/skyfhdqz489rd3wczl0ilbji5f4q89p2-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/a53jvj76q83mhnp8nxik2s5amp9izwj2-nixos-system-nixplay-24.05.20240131.b8b232a.drv' failed to build
code-asher commented 5 months ago

I believe I finally got this fixed while updating to 4.23.1.