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

Action fails with error Command "npm" not found. #1126

Open
gotson opened this issue Nov 1, 2024 · 8 comments
Open

Action fails with error Command "npm" not found. #1126

gotson opened this issue Nov 1, 2024 · 8 comments

Comments

@gotson
Copy link

gotson commented Nov 1, 2024

I am trying to use the action on my project here: https://github.com/gotson/komga-website/actions/runs/11623523702/job/32370686097

It seems this was raised before in #69 but i don't see any mention of yarn in the code, so i'm wondering if it is supposed to work or not.

My workflow file is here: https://github.com/gotson/komga-website/blob/master/.github/workflows/browserlist-update.yml

Am i missing some config in my workflow file, or is this not supported ?

@brunobesson
Copy link
Member

Hi, and sorry for the late answer. Indeed, the command that is run is npx update-browserslist-db@latest, so yarn is not supported currently.

However, i should be fairly easy to add. I am now yarn user, is yarn dlx the corresponding command?

@gotson
Copy link
Author

gotson commented Nov 18, 2024

I am now yarn user, is yarn dlx the corresponding command?

i'm not even sure myself

@brunobesson
Copy link
Member

I released v2.5.0 which should handle other package managers. Let me know whether it works or you encounter issues.

@gotson
Copy link
Author

gotson commented Nov 22, 2024

thanks!

I'm using c2corg/browserslist-update-action@v2 in my action, which should point to v2.5 from what i see, but it still fails: https://github.com/gotson/komga-website/actions/runs/11965908470/job/33360702651

@brunobesson
Copy link
Member

According to https://github.com/antfu-collective/package-manager-detector/blob/main/src/commands.ts (which is the library I used to detec package manager), yarn berry (2+) should indeed use yarn dlx

image

I'll try to provide you a test version with some debug output.

@brunobesson
Copy link
Member

Also, could you try with an explicit v2.5.0 version?

@gotson
Copy link
Author

gotson commented Nov 25, 2024

Also, could you try with an explicit v2.5.0 version?

Just tried but still the same issue https://github.com/gotson/komga-website/actions/runs/12001951497/job/33453189993

@gotson
Copy link
Author

gotson commented Dec 5, 2024

Just a heads up that i migrated my project to npm. Somehow i used yarn because the project samples were using yarn, but after checking again the project also supports npm, so i switched to that because i am more familiar with it.

Feel free to close this ticket, as i won't be monitoring it myself since i don't need it anymore. Thanks for the great work on this project!

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

No branches or pull requests

2 participants