Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm query *:missing only return one item when no dependency are installed (for package.json with 2 dependencies and 2 devDependencies).
No luck with any combination of selector (.dev,.prod) or pseudo-selector (:root, :scope).
Expected Behavior
I expect all "dependencies not found on disk" to be returned.
Steps To Reproduce
mkd my-package
npm init -y
npm i canvas-context canvas-tint-image
npm i -D glob
rm -r node_modules
npm query '*:missing'
// returns
[
{
"name": "canvas-context",
"version": "^3.2.0",
"_id": "canvas-context@^3.2.0",
"pkgid": "canvas-context@^3.2.0",
"path": null,
"realpath": null,
"resolved": null,
"from": [],
"to": [],
"dev": true,
"inBundle": false,
"deduped": false,
"overridden": false,
"queryContext": {}
}
]
Only the first missing package removed from node_modules is returned.
Environment
- npm: 10.5.0
- Node.js: v21.7.1
- OS Name: MacOS
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm query *:missingonly return one item when no dependency are installed (for package.json with 2 dependencies and 2 devDependencies).No luck with any combination of selector (.dev,.prod) or pseudo-selector (:root, :scope).
Expected Behavior
I expect all "dependencies not found on disk" to be returned.
Steps To Reproduce
Only the first missing package removed from node_modules is returned.
Environment