Details
-
Bug
-
Status: Closed
-
High
-
Resolution: Cannot Reproduce
-
2.26.07, 2.28.00
Description
The frontend part of the channel manager does not build on Windows, even when the frontend tools (npm, bower and grunt) are correctly installed and can be executed on the command line.
Steps to reproduce:
1. checkout the channel manager on Windows (tried with Windows 7)
2. build it with "mvn clean install" (or just the 'frontend' module of it)
Expected: the build succeeds
Actual: the build fails with the following error:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (clean-bower) on project hippo-addon-channel-manager-frontend: Command execution failed. Cannot run program "npm" (in directory "D:\work\hippoCMS\addon-channel-manager\trunk\frontend"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
The workaround is to replace the maven-exec configuration in the frontend/pom.xml file. For example, this snippet:
<execution>
<id>npm-install</id>
<phase>generate-sources</phase>
<goals><goal>exec</goal></goals>
<configuration>
<executable>npm</executable>
<commandlineArgs>install</commandlineArgs>
</configuration>
</execution>
should be replaced with:
<execution>
<id>npm-install</id>
<phase>generate-sources</phase>
<goals><goal>exec</goal></goals>
<configuration>
<executable>cmd</executable>
<commandlineArgs>/c npm install</commandlineArgs>
</configuration>
</execution>
A second problem is that executing "npm install" in the frontend module (either via Maven or separately on the command line) also fails on Windows if there's no C++ compiler installed. The problem is related to [1]. The installation tries to compile a Socket.IO C++ thingy that is required by Karma, which is required to run our unit tests. The workaround is to remove all karma-* dependencies from the package.json file, but that also makes it impossible for a Windows user to execute the unit tests.
[1] http://stackoverflow.com/questions/16469086/npm-cant-install-socket-io
Attachments
Issue Links
- relates to
-
CHANNELMGR-48 Update Maven exec plugin version to 1.3.2
- Closed