gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Do we need to install nodejs/npm to work?

Open kumar-tadepalli opened this issue 7 years ago • 3 comments

As per documentation "This plugin enables you to run any NodeJS script as part of your build. It does not depend on NodeJS (or NPM) being installed on your system.". But when we try to do nodeinstall command it is throwing not found error(npm.cmd),

I'm aware of node config node { download = true } That means anyhow we are installing nodejs right?

kumar-tadepalli avatar Feb 14 '18 16:02 kumar-tadepalli

Maybe you need to specify some more config parameters: try adding version, distBaseUrl.

node {
  version = '8.9.4'
  distBaseUrl = 'https://nodejs.org/dist'
  download = true
}

milosonator avatar Mar 15 '18 16:03 milosonator

The nodejs version gets downloaded but is not added to the environment variables. I have not found a solution to a similar problem where my build.gradle script calls node. I get the error A problem occurred starting process 'command 'node''.

ybhat avatar Mar 23 '18 02:03 ybhat

I have the same problem, if the nodejs not installed on the same machine, then build will fail. Nodejs was downloaded by gradle plugin, but not set to the path maybe.

vrapalis avatar May 08 '18 10:05 vrapalis