pnpm.configHook: improve error message when install fails due to hash (#397491)
This commit is contained in:
commit
12d4e48d62
@ -44,11 +44,23 @@ pnpmConfigHook() {
|
|||||||
|
|
||||||
runHook prePnpmInstall
|
runHook prePnpmInstall
|
||||||
|
|
||||||
pnpm install \
|
if ! pnpm install \
|
||||||
--offline \
|
--offline \
|
||||||
--ignore-scripts \
|
--ignore-scripts \
|
||||||
"${pnpmInstallFlags[@]}" \
|
"${pnpmInstallFlags[@]}" \
|
||||||
--frozen-lockfile
|
--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"
|
echo "Patching scripts"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user