NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.32k stars 14.29k forks source link

pnpm and yarn installation hangs and does not appear in processes (Node.js) #359376

Open mapinedad opened 6 hours ago

mapinedad commented 6 hours ago

Issue description

I am encountering an issue with pnpm while attempting to install dependencies on a NixOS server. The installation process hangs indefinitely during dependency resolution and does not proceed further. Additionally, when inspecting the processes using top or htop, the pnpm process does not appear, which suggests that it might be blocked or stalled without consuming resources.

I've attempted various optimizations and configurations, including clearing the cache, limiting resource usage, and testing network settings, but the issue persists.

The server specifications are:

RAM: 4GB Swap: 512MB CPU: 2 cores Node.js version: 18 pnpm version: Latest yarn version: Latest This issue significantly impacts the ability to work with pnpm or yarn on NixOS effectively.

Steps to reproduce

Install Node.js 18 on a NixOS server. Install pnpm using npm with the command: npm install -g pnpm
Attempt to install a dependency using pnpm. For example: pnpm add --save-prod --prefer-offline
Observe that the process hangs indefinitely and does not proceed.

Technical details

sheikh@pelagrino-production:~/ > nix-shell -p nix-info --run "nix-info -m"
these 3 paths will be fetched (46.90 MiB download, 206.52 MiB unpacked): /nix/store/mswlm05dvixp5p7bxgqzk5lzkz30isxm-gcc-12.2.0 /nix/store/061ybr50r1m2jnvih4vvpgmgwb37df3r-gcc-wrapper-12.2.0 /nix/store/dw70k9j6gny70iwxh0jrdnkal4vlbqv6-stdenv-linux copying path '/nix/store/mswlm05dvixp5p7bxgqzk5lzkz30isxm-gcc-12.2.0' from 'https://cache.nixos.org'...

copying path '/nix/store/061ybr50r1m2jnvih4vvpgmgwb37df3r-gcc-wrapper-12.2.0' from 'https://cache.nixos.org'... copying path '/nix/store/dw70k9j6gny70iwxh0jrdnkal4vlbqv6-stdenv-linux' from 'https://cache.nixos.org'...

donovanglover commented 5 hours ago

Looks like a duplicate of https://github.com/NixOS/nixpkgs/issues/353709. Try updating your kernel