frontend build hints
Opened this issue · 0 comments
KITKATXU commented
Hi,
my frontend build constantly fails for
- [INFO] (node:1604) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
- ECONFLICT Unable to find suitable version for angular-animate
- [ERROR] D:\metanome\Metanome-master\frontend\src\node_modules\browser-sync\node_modules\localtunnel\node_modules\debug\src\node.js:132
[ERROR] let val = process.env[key];
[ERROR] ^^^
for problem 1: I lowered the nodejs version before executing npm install
v4.9.1
2.15.11
for problem 2: I relaxed the bounds on angular-animate in bower.json
"angular-animate": "~1",
for problem3: my lowered version of node brought new problems, so i installed node again before the gulp build execution
v4.9.1
2.15.11
My final fixed pom.xml is as follows:
4.0.0
<artifactId>frontend</artifactId>
<packaging>war</packaging>
<name>frontend</name>
<parent>
<groupId>de.metanome</groupId>
<artifactId>metanome</artifactId>
<version>1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<filesets>
<fileset>
<directory>src/</directory>
<includes>
<include>etc/**</include>
<include>.tmp/**</include>
<include>bower_components/**</include>
<include>etc/**</include>
<include>metanome/**</include>
<include>node/**</include>
<include>node_modules/**</include>
<include>src/app/config.js</include>
</includes>
<excludes>
<exclude>e2e/**</exclude>
<exclude>gulp/**</exclude>
<exclude>src/**</exclude>
<exclude>WEB-INF/**</exclude>
<exclude>.bowerrc</exclude>
<exclude>.editorconfig</exclude>
<exclude>.jshintrc</exclude>
<exclude>.yo-rc.json</exclude>
<exclude>bower.json</exclude>
<exclude>gulpfile.js</exclude>
<exclude>karma.conf.js</exclude>
<exclude>package.json</exclude>
<exclude>protractor.conf.js</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
<warSourceExcludes>
.tmp/**,
metanome/**,
bower_components/**,
e2e/**,
gulp/**,
node_modules/**,
src/**,
.bowerrc,
.editorconfig,
.jshintrc,
.yo-rc.json,
bower.json,
gulpfile.js,
karma.conf.js,
package.json,
protractor.conf.js
</warSourceExcludes>
<webXml>WEB-INF/web.xml</webXml>
<webResources>
<resource>
<directory>src/metanome</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<compilerArgument>-Xlint:all</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<workingDirectory>src</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<nodeVersion>v4.9.1</nodeVersion>
<npmVersion>2.15.11</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install --silent</arguments>
</configuration>
</execution>
<execution>
<id>bower install</id>
<goals>
<goal>bower</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install --quiet --force-latest</arguments>
</configuration>
</execution>
<execution>
<id>install node and npm 2</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<nodeVersion>v6.14.3</nodeVersion>
<npmVersion>3.1.0</npmVersion>
</configuration>
</execution>
<execution>
<id>gulp build</id>
<goals>
<goal>gulp</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<nodeVersion>v6.14.3</nodeVersion>
<arguments>build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
It worked for me and hope it helps you too.