Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Can not get npm ls to show origin of an optional dependency #7532

Open
2 tasks done
inwenis opened this issue May 15, 2024 · 2 comments
Open
2 tasks done

[BUG] Can not get npm ls to show origin of an optional dependency #7532

inwenis opened this issue May 15, 2024 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@inwenis
Copy link

inwenis commented May 15, 2024

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

npm ls node-gyp-buid
test-npm@1.0.0 C:\git\test-npm
`-- (empty)

Expected Behavior

npm ls node-gyp-buid
test-npm@1.0.0 C:\git\test-npm
kafka-lz4-lite@1.0.5
    └─┬ piscina@3.2.0
      └─┬ nice-napi@1.0.2
        └── node-gyp-build@4.8.1

Steps To Reproduce

npm init -y
npm install kafka-lz4-lite@latest
npm ls node-gyp-buid
npm ls --all node-gyp-buid
npm ls --include=optional node-gyp-buid

Environment

  • npm: 10.7.0
  • Node.js: v22.0.0
  • OS Name: win
  • System Model Name:
  • npm config:
; "user" config from ...

msbuild_path = "c:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe"
msvs_version = "2017"

; node bin location = C:\programki\nodejs\node.exe
; node version = v22.0.0
; npm local prefix = C:\git\test-npm
; npm version = 10.7.0
; cwd = C:\git\test-npm
; HOME = ...
; Run `npm config ls -l` to show all defaults.
@inwenis inwenis added Bug thing that needs fixing Needs Triage needs review for next steps labels May 15, 2024
@wraithgar
Copy link
Member

Is the dependency actually installed? npm ls will only show the packages that are actually installed.

@inwenis
Copy link
Author

inwenis commented May 18, 2024

thank you for the reply @wraithgar
The pacakge I'm looking for is not present in node_modules.
Is there a way to analyse the deprendency tree including optional deps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants