srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
866 stars 211 forks source link

Do we need to install nodejs/npm to work? #288

Open kumar-tadepalli opened 6 years ago

kumar-tadepalli commented 6 years ago

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?

milosonator commented 6 years ago

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
}
ybhat commented 6 years ago

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''.

vrapalis commented 6 years ago

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.