craigburke / karma-gradle

Gradle Plugin for Running tests with Karma
Other
21 stars 11 forks source link

How to prevent node download or override default version #35

Open robdawsonthales opened 6 years ago

robdawsonthales commented 6 years ago

Is there some way to allow karma to use the version of node that is installed locally, rather than downloading v4.2.3? I can see that you set various options here but I don't see any way to override them.

My build is currently failing because one of the libraries I depend on uses some ES6 syntax that node v4 doesn't understand, so I either need to have the build download a more recent node version, or use the local install.

robdawsonthales commented 6 years ago

This seems fairly urgent as the latest version of karma has dropped support for node v4

jthomperoo commented 6 years ago

Hi, I was looking into this and have found a way to change the version of node being used, thanks to this stack overflow post, just add the following to your build.gradle file, putting in whichever node version suits you: node {
// Version of node to use.
version = '8.0.0'
}