From d028ea9cd8a4abf92d69b993467e702c0e778e55 Mon Sep 17 00:00:00 2001 From: Winter Date: Wed, 31 Dec 2025 00:35:11 -0500 Subject: [PATCH] npmConfigHook: suggest cache v2 when `npm install` fails --- .../node/build-npm-package/hooks/npm-config-hook.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh index 18937c85c692..c9e8dac4c78d 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh @@ -127,9 +127,10 @@ npmConfigHook() { echo "ERROR: npm failed to install dependencies" echo echo "Here are a few things you can try, depending on the error:" - echo '1. Set `makeCacheWritable = true`' + echo '1. Set `npmDepsCacheVersion = 2` (and update `npmDepsHash`)' + echo '2. Set `makeCacheWritable = true`' echo " Note that this won't help if npm is complaining about not being able to write to the logs directory -- look above that for the actual error." - echo '2. Set `npmFlags = [ "--legacy-peer-deps" ]`' + echo '3. Set `npmFlags = [ "--legacy-peer-deps" ]`' echo exit 1