eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.25k stars 870 forks source link

frontend-maven-plugin using system node/npm even when specific version is asked for #453

Open RangerRick opened 8 years ago

RangerRick commented 8 years ago

We are using frontend-maven-plugin in our build to download and install Node and NPM of specific versions, and having some developers who have a newer or incompatibly different Node version already installed on their system cause failures:

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:karma (execute karma tests) on project opennms-webapp: Failed to run task: 'karma start karma.conf.js' failed. (error code 1) -> [Help 1]

Since we have no real way of knowing what state any random developer's system is in, is it possible to force the frontend-maven-plugin to always force the version specified in <nodeVersion> and <npmVersion>?

RangerRick commented 8 years ago

Looking through your issues, it looks like maybe https://github.com/eirslett/frontend-maven-plugin/pull/396 might solve it?

I can confirm that we're using <nodeDownloadRoot> and <npmDownloadRoot> in our build (And we can't not use it... Without it our CI system was hitting the node/npm servers enough that they rate-limit us and builds failed. I have a local mirror set up instead.)

eirslett commented 8 years ago

The maven plugin downloads node and npm to a local folder, and whenever you run karma etc via the plugin, it will use that local/sandboxed node/npm environment. The system installation of node is never involved.