npm-check
npm-check copied to clipboard
Broken in asdf nodejs version manager when updating global package
when checking for global package npm-check -g, it keeps saying that there're updates available, even after you update the said 'old version' global package.
I've tried adding environment variable such as NODE_PATH=.asdf/installs/nodejs/10.15.2/.npm/lib/node_modules/ npm-check -gu, but still didn't work.
This is likely related to asdf-vm/asdf-nodejs#228.
I tested that fix manually:
rm -rf ~/.asdf/plugins/nodejs/bin/{exec-env,list-bin-paths}
Removed the existing nodejs installs:
rm -rf ~/.asdf/installs/nodejs
Then asdf install nodejs lts to reinstall nodejs and all global packages, npm-check -g works as expected.
npm-check truncated debug output
$ npm-check -g --debug
[npm-check] debug
cli.flags {
global: true,
debug: true,
update: false,
updateAll: false,
skipUnused: false,
production: false,
devOnly: false,
saveExact: false,
color: false,
emoji: true,
spinner: true
}
===============================
[npm-check] debug
cli.input []
===============================
[npm-check] debug
set key spinner to value true
===============================
[npm-check] debug
set key ignore to value undefined
===============================
The global path you are searching is: /Users/corey/.asdf/installs/nodejs/16.16.0/lib/node_modules // ✅
[npm-check] debug
set key cwd to value /Users/corey/.asdf/installs/nodejs/16.16.0/lib/node_modules // ✅
Hope that helps… 🖖