All issues

nodejs-maven-plugin bundles npm 1.4.9 that seems to ignore npm install's --prefix directory
WTOOL-49
maven io.wcm.maven.aem-dependencies 6.4.6
WTOOL-55
bundleStatusWhitelistBundleNames is missing 2 more bundles: WebDAV & DavEx
WTOOL-54
Sling-Initial-Content i18n mode "merge"
WTOOL-53
Content Package Maven Plugin: Allow whitelisting(/blacklisting?) of bundles for bundleStatusURL
WTOOL-52
Archetype should support building and deploying bundle only
WTOOL-51
WCM.io parent wcmio-content-package-maven-plugin download: Add extra excludeMixins for dam:Thumbnails & mix:lockable
WTOOL-50
Restructure /apps folders of the archetype generated projects
WTOOL-48
wcmio-content-package-maven-plugin swallows JSON upload error
WTOOL-47
nodejs-maven-plugin: allow installation of nodeJs only
WTOOL-46
nodejs-maven-plugin: allow usage of latest- version for nodeJs
WTOOL-45
Maven Archetype should not accept invalid packagenames / create only valid ones
WTOOL-44
io.wcm.maven.aem-dependencies: commons-email is missing
WTOOL-43
AEM-Dependencies should also be created for 6.3 SP1, and also for CFPs
WTOOL-42
Clarify differences towards filevault-package-maven-plugin
WTOOL-41
Download goal should also process XML documents other than .content.xml
WTOOL-40
Maven Archetype for starting new wcm.io-based projects
WTOOL-39
wcmio-content-package-maven-plugin:download - Disable reordering of xmlns-attributes
WTOOL-38
wcmio-content-package-maven-plugin:download - Add option to remove mixins
WTOOL-37
wcmio-content-package-maven-plugin:download adds space in front of /> when rewriting XML
WTOOL-36
Otros Log Viewer install script for unix systems
WTOOL-35
Crx Packmgr Helper: Check for status of Package Manager Servlet before installation is being triggered
WTOOL-34
An already failed Bundle will make any further bundle deployments fail
WTOOL-32
Create FileVault Packages with Content Package Maven Plugin
WTOOL-31
Changes to crx-packmgr-helper is causing the build to fail due to Baseline check
WTOOL-30
Support Sling / Composum Content Package Install
WTOOL-29
Add support for "oak" XML-Namespace
WTOOL-28
Add support for NPM 3.x for Windows
WTOOL-27
Netbeans: Add Code-Templating
WTOOL-26
Netbeans: Add Support for Documentation of Autocompletion
WTOOL-25
Allow self-signed certificates for content-package plugin
WTOOL-24
PackageBuilder use DateFormat with wrong timezone
WTOOL-23
Split wcm.io git repo into multiple git repos
WTOOL-22
Sonatype and GPG plugin are inherited to projects
WTOOL-21
Make sure nodejs plugin uses specified version of npm
WTOOL-20
Make sure the nodejs plugin checks, if all artefacts are installed correctly before executing tasks
WTOOL-18
Node.js Maven Plugin: Download Node.js binaries from Maven Artifact Repository
WTOOL-16
i18n Maven Plugin to create Sling mix:language content structure
WTOOL-15
Tooling: Node.js Binary Download Maven Proxy
WTOOL-14
wcm.io Content Package Maven Plugin: Delay package install when bundles are still starting/stopping
WTOOL-13
Changes in wcmio-content-package config are ignored if package has been uploaded before
WTOOL-11
post install tasks requiring node fail, when using 2.x npm version
WTOOL-9
Add support for RequestAttributes
WTOOL-7
Netbeans: Add support for i18n autocompletion
WTOOL-6
Netbeans: Add support for inline cascading
WTOOL-5
Netbeans: Lookup of classes in data-sly-list does not work
WTOOL-4
Netbeans: No detection if -use or -list statement is break up to multiple lines
WTOOL-3
Netbeans: If there is another "=" after a data-sly-use declaration, no members can be found
WTOOL-2
Netbeans: ClassLookup for data-sly-use.foo="de.my.class" does not work
WTOOL-1
maven-javadoc-plugin fails when using jaxws-maven-plugin
WTOOL-33
issue 1 of 55

nodejs-maven-plugin bundles npm 1.4.9 that seems to ignore npm install's --prefix directory

Description

The plugin is configured with these settings:

1 2 3 <npmVersion>6.4.1</npmVersion> <nodeJsVersion>10.15.2</nodeJsVersion> <nodeJsDirectory>${project.basedir}/nodejsplugin-cache</nodeJsDirectory>

Running under Windows, the following happens:

The plugin downloads npm 1.4.9. It uses npm 1.4.9 to install the npm specified in the pom.xml, i.e. 6.4.1.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [INFO] --- nodejs-maven-plugin:2.0.4:run (default-cli) @ nolio-core-ui --- [INFO] Installing specified npm version 6.4.1 [INFO] Running process: C:\project\nodejsplugin-cache\v-10.15.2\node.exe C:\project\nodejsplugin-cache\v-10.15.2\npm\bin\npm-cli.js install --prefix C:\project\nodejsplugin-cache npm@6.4.1 [INFO] [nodejs] npm http GET https://registry.npmjs.org/npm [INFO] [nodejs] npm http 304 https://registry.npmjs.org/npm [WARNING] [nodejs] npm WARN prefer global npm@6.4.1 should be installed with -g [WARNING] [nodejs] npm WARN package.json path-is-inside@1.0.2 No README data [WARNING] [nodejs] npm WARN package.json sorted-object@2.0.1 No README data [WARNING] [nodejs] npm WARN package.json punycode@1.4.1 punycode is also the name of a node core module. [WARNING] [nodejs] npm WARN package.json string_decoder@1.1.1 string_decoder is also the name of a node core module. [INFO] [nodejs] npm@6.4.1 node_modules\npm [INFO] Running process: C:\project\nodejsplugin-cache\v-10.15.2\node.exe C:\project\nodejsplugin-cache\node_modules\npm\bin\npm-cli.js install --prefix C:\project\nodejsplugin-cache\ grunt-cli [INFO] [nodejs] internal/modules/cjs/loader.js:583 [INFO] [nodejs] throw err; [INFO] [nodejs] ^ [INFO] [nodejs] [INFO] [nodejs] Error: Cannot find module 'C:\project\nodejsplugin-cache\node_modules\npm\bin\npm-cli.js' [INFO] [nodejs] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) [INFO] [nodejs] at Function.Module._load (internal/modules/cjs/loader.js:507:25) [INFO] [nodejs] at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) [INFO] [nodejs] at startup (internal/bootstrap/node.js:283:19) [INFO] [nodejs] at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------

What happens is, the plugin tries to install the new npm into --prefix directory, but without the -g option, the old npm doesn't install where you tell it to, it will instead walk up the hierarchy looking for a node_modules/ directory or a package.json file.

Branching from this commit:

1 2 3 commit 56810260cfe6ea8d7b9bb573ecff1eaba7fd2bff Author: sseifert <sseifert@pro-vision.de> Date: Wed Feb 8 23:15:46 2017 +0100

I changed AbstractNodeJsMojo.java:

1 2 3 npmInstallTask.setArguments(new String[] { "--prefix", nodeJsDirectory.getAbsolutePath(), "-g", "npm@" + npmVersion });

To pass the "-g" argument and now it works as expected.

Environment

None

Status

Assignee

Stefan Seifert

Reporter

Yuri Geinish

Labels

None

Components

Fix versions

Affects versions

Node.js Maven Plugin 2.0.4

Priority

Blocker
Configure