npm / npm/cli

[BUG] npm outdated does not list global installed packages

Open
#6,098 10 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Priority 2 Release 8.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Is there an existing issue for this?
  • I have searched the existing issues
This issue exists in the latest npm version
  • I am using the latest npm
Current Behavior

I have installed calculator@0.1.11 globally by running npm install -g calculator@0.1.11. Running npm help outdated shows me the documentation, which lists global as a valid option. So I tried to run:

npm outdated -g

But it outputs nothing. Running all the possible variations:

npm outdated -g

npm outdated --global

npm outdated global

None of them give any output. I expected to see the available upgrade to calculator@0.1.12

Expected Behavior
npm outdated -g
Package     Current  Wanted  Latest  Location                 Depended by
calculator   0.1.11  0.1.12  0.1.12  node_modules/calculator  User
Steps To Reproduce
  1. npm install -g calculator@0.1.11
  2. npm outdated -g
Environment

I installed node through nvm 1.1.9

  • npm: 8.19.3
  • Node.js: v16.19.0
  • OS Name: Windows 22H2
  • System Model Name: ?
  • npm config:
; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.19.0
; npm local prefix = C:\Users\User
; npm version = 8.19.3
; cwd = C:\Users\User
; HOME = C:\Users\User
; Run `npm config ls -l` to show all defaults.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with the documented npm outdated -g command after installing calculator@0.1.11 globally, then trace the outdated command's global-package entry point. Done means the command reports the installed calculator package and its available 0.1.12 upgrade as shown in the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.