diff options
| author | Gutyina Gergő <gutyina.gergo.2@gmail.com> | 2025-04-09 22:51:34 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2025-04-14 16:21:09 +0000 |
| commit | bf9258e1bd9000bfd48df6ccfd804a8c603827bc (patch) | |
| tree | 86508e2620a31c8a66e59acb60e4373d40fdaef3 | |
| parent | phpunit: 12.1.0 -> 12.1.2 (#398606) (diff) | |
| download | nixpkgs-origin/backport-397491-to-release-24.11.tar.gz | |
pnpm.configHook: improve error message when install fails due to old hashorigin/backport-397491-to-release-24.11
(cherry picked from commit 301386770209a734cc7c64918a39136a74c83d9f)
| -rw-r--r-- | pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh b/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh index 09652b8c6965..f66f06c0a867 100644 --- a/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh +++ b/pkgs/development/tools/pnpm/fetch-deps/pnpm-config-hook.sh @@ -44,11 +44,23 @@ pnpmConfigHook() { runHook prePnpmInstall - pnpm install \ + if ! pnpm install \ --offline \ --ignore-scripts \ "${pnpmInstallFlags[@]}" \ --frozen-lockfile + then + echo + echo "ERROR: pnpm failed to install dependencies" + echo + echo "If you see ERR_PNPM_NO_OFFLINE_TARBALL above this, follow these to fix the issue:" + echo '1. Set pnpmDeps.hash to "" (empty string)' + echo "2. Build the derivation and wait for it to fail with a hash mismatch" + echo "3. Copy the 'got: sha256-' value back into the pnpmDeps.hash field" + echo + + exit 1 + fi echo "Patching scripts" |
