NPM Debug Info
Often we wish to debug our npm environment such as whether a package is used from local or global. Below is the way to do it.
> npx envinfo --system --binaries --npmPackages netlify-cli --npmGlobalPackages netlify-cli
Need to install the following packages:
envinfo@7.11.0
Ok to proceed? (y) y
System:
OS: macOS 14.1.1
CPU: (8) arm64 Apple M2
Memory: 101.45 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.2.0 - /opt/homebrew/bin/node
npm: 10.2.3 - /opt/homebrew/bin/npm
pnpm: 8.10.2 - /opt/homebrew/bin/pnpm
bun: 1.0.11 - ~/Library/pnpm/bun
npmGlobalPackages:
netlify-cli: 16.3.1
It display the status of all binaries related to package netlify-cli. It is extremely helpful for debugging and testing particularly if you have multiple versions of same binary.