From 93277112aeb967743d367455ce62a7485420a0b5 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 26 Jul 2024 09:16:03 -0700 Subject: [PATCH] [Fix] `install-latest-npm`: npm ^8.7 breaks `npm ls` with file: deps --- nvm.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index 6dc779eb2c..7f13927c7c 100644 --- a/nvm.sh +++ b/nvm.sh @@ -370,8 +370,9 @@ nvm_install_latest_npm() { || { [ $NVM_IS_16_OR_ABOVE -eq 1 ] && [ $NVM_IS_16_LTS_OR_ABOVE -eq 0 ]; } \ || { [ $NVM_IS_17_OR_ABOVE -eq 1 ] && [ $NVM_IS_18_OR_ABOVE -eq 0 ]; } \ ; then - nvm_echo '* `npm` `v8.x` is the last version that works on `node` `v12`, `v14.13` - `v14.16`, or `v16.0` - `v16.12`' - $NVM_NPM_CMD install -g npm@8 + nvm_echo '* `npm` `v8.6` is the last version that works on `node` `v12`, `v14.13` - `v14.16`, or `v16.0` - `v16.12`' + # ^8.7 breaks `npm ls` on file: deps + $NVM_NPM_CMD install -g npm@8.6 elif \ [ $NVM_IS_18_17_OR_ABOVE -eq 0 ] \ || { [ $NVM_IS_19_OR_ABOVE -eq 1 ] && [ $NVM_IS_20_5_OR_ABOVE -eq 0 ]; } \