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] npm search module_does_not_exist --json returns invalid JSON #3737

Closed
1 task done
dionjwa opened this issue Sep 10, 2021 · 0 comments · Fixed by #3738
Closed
1 task done

[BUG] npm search module_does_not_exist --json returns invalid JSON #3737

dionjwa opened this issue Sep 10, 2021 · 0 comments · Fixed by #3738
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@dionjwa
Copy link

dionjwa commented Sep 10, 2021

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

@dionjwa dionjwa added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Sep 10, 2021
@dionjwa dionjwa changed the title [BUG] <title> [BUG] npm search module_does_not_exist --json returns invalid JSON Sep 10, 2021
AyushRawal added a commit to AyushRawal/cli-1 that referenced this issue Sep 11, 2021
return valid json with npm search module_not_exists --json
@AyushRawal AyushRawal mentioned this issue Sep 11, 2021
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 Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants