Open ItsIgnacioPortal opened 1 year ago
imo npm outdated -g
doesn't really make sense, since there's no global package.json.
imo
npm outdated -g
doesn't really make sense, since there's no global package.json.
The objective of running npm-outdated for global packages is to check if we have the latest version available. Otherwise there is no easy way of checking for updates. This should be supported
I can't reproduce this.
$ npm i -g calculator@0.1.11
added 76 packages, and audited 77 packages in 2s
found 0 vulnerabilities
~/D/n/c/b/main (latest|✔) $ npm outdated -g
Package Current Wanted Latest Location Depended by
calculator 0.1.11 0.1.12 0.1.12 node_modules/calculator global
~/D/n/c/b/main (latest|✔) $ npm -v
8.19.3
Are you using nvs
by chance? https://github.com/jasongin/nvs/issues/252
I can't reproduce this.
$ npm i -g calculator@0.1.11 added 76 packages, and audited 77 packages in 2s found 0 vulnerabilities ~/D/n/c/b/main (latest|✔) $ npm outdated -g Package Current Wanted Latest Location Depended by calculator 0.1.11 0.1.12 0.1.12 node_modules/calculator global ~/D/n/c/b/main (latest|✔) $ npm -v 8.19.3
Are you using
nvs
by chance? jasongin/nvs#252
Nope. I never installed nvs. I'm using nvm. I'm on windows though. You seem to be on linux
nvm-windows, or actual nvm?
nvm-windows, or actual nvm?
nvm-windows
I have a similar problem.
I used nvm-windows and installed node v18.9.0
and npm v9.4.0
.
Also, this problem has already happened with npm
v8.x
.
By the way, nvs also has this problem.
I'm having the same issue.
As part of https://github.com/q-nick/npm-gui/issues/89 I tried to research a little. These are my findings:
Nodejs version v18.11.0.
NPM version 9.4.1.
I also have nvm-windows installed. Version 1.1.10.
Weirdly enough, npm-check-updates does detect updates correctly.
npm outdated -g --all
does execute the outdated check, but also for dependencies of dependencies (because that's what --all
does).
Sadly npm outdated -g --all --depth=0
did not change the huge list.
npm ls -g --depth=0
does detect all global installed packages correctly.
npm ls -g --depth=0 --json
.My suspicion is that resolved
property is not correctly handled in npm outdated -g
.
Happens to me with nvm-windows and fnm on Windows 11.
On Node.js 20.14.0, fnm 1.37, npm 10.8.1
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I have installed calculator@0.1.11 globally by running
npm install -g calculator@0.1.11
. Runningnpm help outdated
shows me the documentation, which lists global as a valid option. So I tried to run:But it outputs nothing. Running all the possible variations:
None of them give any output. I expected to see the available upgrade to calculator@0.1.12
Expected Behavior
Steps To Reproduce
npm install -g calculator@0.1.11
npm outdated -g
Environment
I installed node through nvm 1.1.9