From f607f2f783dac3a1d7cfc754c0886bf05c05e277 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 10 Mar 2020 23:51:17 -0700 Subject: [PATCH] [Fix] `reinstall-packages`: do not include unmet peer deps Closes #1948. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 7ba32d8..78eff32 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2167,7 +2167,7 @@ nvm_npm_global_modules() { local NPMLIST local VERSION VERSION="$1" - NPMLIST=$(nvm use "${VERSION}" >/dev/null && npm list -g --depth=0 2>/dev/null | command sed 1,1d) + NPMLIST=$(nvm use "${VERSION}" >/dev/null && npm list -g --depth=0 2>/dev/null | command sed 1,1d | nvm_grep -v 'UNMET PEER DEPENDENCY') local INSTALLS INSTALLS=$(nvm_echo "${NPMLIST}" | command sed -e '/ -> / d' -e '/\(empty\)/ d' -e 's/^.* \(.*@[^ ]*\).*/\1/' -e '/^npm@[^ ]*.*$/ d' | command xargs)