nodejs-maven-plugin: allow installation of nodeJs only

Description

Currently the naming in the NodeJs plugin is to configure a npmInstallTask.

Nowadays NPM is bundled with NodeJs and does not require a manual installation, therefor I'd suggest to allow the standalone installation of NodeJs.

Activity

Show:
Stefan Seifert
April 4, 2019, 11:13 PM

this is fixed in Node.js Maven Plugin 3.0.0

please note the new version 1.2.0 of Maven NodeJS Proxy is required because we now support for windows the same type of installation as on the other platforms (using a ZIP file containing both NodeJS and the bundles NPM version) - which is available since Node 6.3.0.

specifying the NPM version is now optional - if not defined the bundles NPM version is used. if it is defined it is ensured there is no clash in the directories as was described as initial problem in this ticket.

Stefan Seifert
June 5, 2018, 7:17 AM

i've not encountered yet problems with different projects using different nodejs/npm version. if we have problems here we definitely need to fix it. can you specify which problems you found (stacktraces etc.?)

in the long run it might sense to migrate to https://github.com/eirslett/frontend-maven-plugin - it is more actively developed, we should contribute the few features our plugin is better at to it. you might have a look how they solved installation issue and multi platform support.

Alexander Muthmann
June 5, 2018, 6:04 AM

i'm using nvm for multiple node versions, but that does not help when building a project using the maven node plugin...

Masoud Rozati
June 4, 2018, 1:43 PM

I'm not sure, if that helps, but did you consider using nvm to handle multiple node versions?

Alexander Muthmann
June 4, 2018, 11:25 AM
Edited

This is some "fallout" from another issue I currently face: I've got two projects using different node versions, both utilizing the maven plugin.

All node_modules are installed in /tmp/nodejs/node_modules which does not work with multiple versions. So my thought now is, that we should move the node_modules folder into a versioned context (e.g. /tmp/nodejs/node-v4.5.0/node_modules or something alike).

During some tests here, I thought it might be useful to replace the current installation method with a more general one.

Fixed

Assignee

Stefan Seifert

Reporter

Alexander Muthmann

Labels

None

Components

Fix versions

Affects versions

Priority

Major