Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
npm search module_does_not_exist --json
returns invalid JSON
Expected Behavior
npm search module_does_not_exist --json
should valid JSON: []
Steps To Reproduce
npm i -g [email protected]
npm search lodash --json
Outputs valid JSON
npm i -g [email protected]
npm search lodash_does_not_exist --json
Outputs just ]
which is not valid json so e.g. npm search lodash_does_not_exist --json | jq
fails.
Environment
- OS: Linux 5.10.47-linuxkit archive: committable offline dependency archive #1 SMP x86_64 Linux
- Node: v14.17.5
- npm: 7.23.0