yarn-audit-fix icon indicating copy to clipboard operation
yarn-audit-fix copied to clipboard

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

Open mayeaux opened this issue 3 years ago • 6 comments

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

mayeaux avatar Nov 03 '21 16:11 mayeaux

Hey, @mayeaux,

Could you provide a bit more details?

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

antongolub avatar Nov 03 '21 16:11 antongolub

@mayeaux, any news?

antongolub avatar Nov 15 '21 15:11 antongolub

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

mayeaux avatar Nov 17 '21 13:11 mayeaux

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

brainmaniac avatar Mar 19 '22 07:03 brainmaniac

@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 avatar Mar 20 '22 15:03 antongolub

@brainmaniac @mayeaux

Could you provide a reproducible example of the issue?

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

antongolub avatar Mar 23 '22 17:03 antongolub