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

-bash: yarn-audit-fix: command not found #202

Open
mayeaux opened this issue Nov 3, 2021 · 6 comments
Open

-bash: yarn-audit-fix: command not found #202

mayeaux opened this issue Nov 3, 2021 · 6 comments
Labels
question Further information is requested

Comments

@mayeaux
Copy link

mayeaux commented Nov 3, 2021

-bash: yarn-audit-fix: command not found

@antongolub antongolub added the question Further information is requested label Nov 3, 2021
@antongolub
Copy link
Owner

antongolub commented Nov 3, 2021

Hey, @mayeaux,

Could you provide a bit more details?

npm i -g yarn-audit-fix
which yarn-audit-fix

@antongolub
Copy link
Owner

@mayeaux, any news?

@mayeaux
Copy link
Author

mayeaux commented Nov 17, 2021

I can't remember exactly what happened, I'll be returning to the functionality where I was using yarn-audit-fix in a bit I'll let you know if I can reproduce it, thanks

@brainmaniac
Copy link

I have the same issue:

npm -g yarn-audit-fix 
Unknown command: "yarn-audit-fix"

To see a list of supported npm commands, run:
  npm help
where yarn-audit-fix   
yarn-audit-fix not found

How did I get here?

  1. I ran:
    yarn add yarn-audit-fix -D

  2. Tried and got same error as above

  3. Tried npm_config_yes=true npx yarn-audit-fix

  4. Tried again and got same error as above

@antongolub
Copy link
Owner

antongolub commented Mar 20, 2022

@brainmaniac @mayeaux

There was a typo, sorry: npm -g yarn-audit-fix npm i -g yarn-audit-fix

Anyway, I've added a post-release step to check if yaf works as a global pkg or as npx cmd:
https://github.com/antongolub/yarn-audit-fix/blob/master/.github/workflows/ci.yaml#L177

The results:
https://github.com/antongolub/yarn-audit-fix/runs/5618010054?check_suite_focus=true

> npm i -g yarn-audit-fix@latest

# added 87 packages, and audited 88 packages in 1s
# 15 packages are looking for funding
#  run `npm fund` for details
# found 0 vulnerabilities

> which yarn-audit-fix
# /opt/hostedtoolcache/node/16.14.0/x64/bin/yarn-audit-fix

> yarn-audit-fix --version
# 9.2.1

@antongolub
Copy link
Owner

@brainmaniac @mayeaux

Could you provide a reproducible example of the issue?

  • runtime: os, nodejs, yarn
  • yarn-audit-fix version
  • steps: ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants