[BUG] `npm ls --dev` does not show only dev dependencies
Is there an existing issue for this?
- [X] I have searched the existing issues
This issue exists in the latest npm version
- [X] I am using the latest npm
Current Behavior
No response
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- npm:8.11.0
- Node.js:16.15.1
- OS Name:macOS Monterey Version 12.4
--dev is no longer a configuration option, and so no filtering will occur.
[email protected] is the latest, not 8.11.0
As far as the suggested --include=dev, the documentation is unclear, especially in the context of npm ls. For npm install, the documentation states inverse behavior from --omit, so we should expect that in npm ls and we should clarify the docs.
@fritzy, thanks for your response. I have tried both npm ls --indluce=dev and npm ls --omit=prod, but again, the output includes production dependencies.
Would it be possible to get only dev dependencies using the command npm ls like I used to? (I used to run npm ls --dev with npm v6/7).
I second this. npm ls --omit=prod to list only dev-dependencies
user@machine:~/DEV/api$ npm ls --omit=prod
npm WARN invalid config omit="prod" set in command line options
npm WARN invalid config Must be one or more of: dev, optional, peer
I'm using node v16.18.1 with npm v8.19.2