By default the nodejs-maven-plugin should use the npm version bundled with the nodejs version used
Description
Attachments
- 17 Dec 2021, 03:33 PM
causes
Activity
Stefan Seifert December 21, 2021 at 11:20 AM
3.0.4 is released
Stefan Seifert December 20, 2021 at 6:00 PM
the behavior was broken and worked only in windows, not on other OS.
it should be fixed in latest nodejs-maven-plugin - please give it a try with 3.0.3-SNAPSHOT if it solves the problem on your side as well.
Ángel Ruiz December 17, 2021 at 3:33 PM
Thanks Stefan,
if we don’t specify the npm version, then npm version 8.3.0 is the one installed (latest) as you can see in the screenshot bellow and we still get the same error. We did not have any problems until now because node 10.x would not have any problems with npm 7, but now we do.
Stefan Seifert December 17, 2021 at 3:01 PM
this is already the case! - i recommend to not explicitly specify a npm version, but only the nodeJsVersion. this automatically used the bundled npm version.
recommended minimal configuration example:
https://github.com/wcm-io/wcm-io-maven-archetype-aem/blob/2d9272f6fc42494c0fadce0de6fc767db0d6d92b/src/main/resources/archetype-resources/frontend/pom.xml#L39-L65
.. unless otherwise specified.
That would be more consistent with how nodejs is distributed and how other nodejs version managers work.
This would resolve compatibility problems.