Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Run any node_modules/.bin shim inside a Nix derivation, e.g. pnpm run build after pnpmConfigHook:
node_modules/.bin/tsgo: line 44: sed: command not found
node_modules/.bin/tsgo: line 46: cd: null directory
Minimal repro without pnpm:
with import <nixpkgs> { };
runCommand "command-p" { } ''
command -v sed
command -p sed --version
touch $out
''
command -v sed finds gnused; command -p sed fails with sed: command not found (bash 5.3.15).
Describe the Bug
#14903 relies on command -p falling back to PATH on Nix (#14883). That holds in a nixos/nix shell, but not in the Nix build sandbox, so every POSIX shim fails there.
Expected Behavior
Shims run in Nix builds. Current workaround: sed -i 's/command -p /command /g' on the .bin shims before running scripts.
Which Node.js version are you using?
26.10.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Nix build sandbox (nixos-unstable), aarch64
Contributing a fix
Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Run any node_modules/.bin shim inside a Nix derivation, e.g. pnpm run build after pnpmConfigHook:
node_modules/.bin/tsgo: line 44: sed: command not found
node_modules/.bin/tsgo: line 46: cd: null directory
Minimal repro without pnpm:
command -v sed finds gnused; command -p sed fails with sed: command not found (bash 5.3.15).
Describe the Bug
#14903 relies on command -p falling back to PATH on Nix (#14883). That holds in a nixos/nix shell, but not in the Nix build sandbox, so every POSIX shim fails there.
Expected Behavior
Shims run in Nix builds. Current workaround: sed -i 's/command -p /command /g' on the .bin shims before running scripts.
Which Node.js version are you using?
26.10.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Nix build sandbox (nixos-unstable), aarch64
Contributing a fix