Skip to content
Discussion options

You must be logged in to vote

This is expected for JavaScript actions

When you use:

runs:
  using: "node16"
  main: "dist/index.js"

the runner invokes the Node.js binary for the action, but it does not guarantee that npm is available on PATH. JavaScript actions are generally expected to be packaged/self-contained, with their dependencies bundled into dist/ at build time

For normal JS dependencies, the recommended approach is to install them during development/CI and bundle the action, for example with @vercel/ncc:

npm ci
npx @vercel/ncc build index.js -o dist

Then commit the generated dist/ file.

If your action really needs to install or call an external CLI at runtime, a composite action is probably a better fit, bec…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tiagoboeing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants