Figure out the preconditions behind runNodeCommandAsJob
#2324
Labels
refactoring
Keeping that code clean!
runNodeCommandAsJob
#2324
We often use the
runNodeCommandAsJob
function to runnpx
andnpm
commands.The only node-specific thing about
runNodeCommandAsJob
is that it checks whethernode
is installed and inPATH
. It doesn't check fornpm
ornpx
.We use
runNodeCommandAsJob
in three ways:npm
commands.npx
commands.The first two use case require
npm
andnpx
. Theoretically, only the third use case requiresnode
(although, in reality, most NPM scripts requirenode
anyway).We think
npm
andnpx
come together withnode
(but it's still possible that the user doesn't have all of them inPATH
).We should:
This is where the discussion started: #2276 (comment)
The text was updated successfully, but these errors were encountered: