NPM is not defined on the PATH when running using: "node"
#2037
Unanswered
tiagoboeing
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a question about the expected behavior when using JavaScript Custom Actions.
I have a custom Action that runs using NodeJS and needs to install another CLI tool at the runtime, like
azure-functions-core-tools
, but looks like the NPM is not defined to PATH when using NodeJS runtime.Custom Action using NodeJS runtime
Install call using
@actions/exec
Received error:
Is this correct for custom actions that run using NodeJS? The NodeJS should be automatically defined to PATH. (Or not?)
The workaround is to define a custom action to use
using: composite
and do a pure call to NodeJS (node ./dist/index.js
) passing all inputs usingenv
(INPUT_ABC: abc
) and after install the Node through@actions/tool-cache
, but this sounds stranger because I'm using a NodeJS custom actions to install NodeJS. 🤔Beta Was this translation helpful? Give feedback.
All reactions