question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gulp doesn't work in frontend-maven-plugin 1.4

See original GitHub issue

Following configuration worked ok in 1.3, but doesn’t work in 1.4.

Pom config:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>ppp1</groupId>
	<artifactId>ppp1</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<build>
		<sourceDirectory>src</sourceDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.github.eirslett</groupId>
				<artifactId>frontend-maven-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<id>default-cli</id>
						<goals>
							<goal>install-node-and-npm</goal>
						</goals>
						<configuration>
							<nodeVersion>v6.9.1</nodeVersion>
							<npmVersion>3.10.8</npmVersion>
						</configuration>
					</execution>
					<execution>
						<id>npm-install</id>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>install --cache "C:\Users\user1/.npm-cache/my-folder/" --unicode=false</arguments>
						</configuration>
					</execution>
					<execution>
						<id>gulp build</id>
						<goals>
							<goal>gulp</goal>
						</goals>
                        <!-- optional: the default phase is "generate-resources" -->
                        <phase>generate-resources</phase>
					</execution>
				</executions>
				<configuration>
					<installDirectory>C:\Users\user1/.frontend-node/my-folder/</installDirectory>
				</configuration>
			</plugin>

		</plugins>
	</build>
</project>


Error:

[INFO] --- frontend-maven-plugin:1.4:npm (npm-install) @ ppp1 ---
[INFO] Running 'npm install --cache "C:\Users\user1/.npm-cache/my-folder/" --unicode=false' in D:\development\workspaces\workspace_1\ppp1
[INFO] 
[INFO] --- frontend-maven-plugin:1.4:gulp (gulp build) @ ppp1 ---
[INFO] Running 'gulp ' in D:\development\workspaces\workspace_1\ppp1
[ERROR] module.js:471
[ERROR]     throw err;
[ERROR]     ^
[ERROR] 
[ERROR] Error: Cannot find module 'C:\Users\user1\.frontend-node\my-folder\node_modules\gulp\bin\gulp'
[ERROR]     at Function.Module._resolveFilename (module.js:469:15)
[ERROR]     at Function.Module._load (module.js:417:25)
[ERROR]     at Module.runMain (module.js:604:10)
[ERROR]     at run (bootstrap_node.js:394:7)
[ERROR]     at startup (bootstrap_node.js:149:9)
[ERROR]     at bootstrap_node.js:509:3
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.312 s
[INFO] Finished at: 2017-03-30T15:07:19+03:00
[INFO] Final Memory: 9M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.4:gulp (gulp build) on project ppp1: Failed to run task: 'gulp ' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR] 

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mgohincommented, Jan 22, 2018

Looks like it didn’t change in 1.6

0reactions
eirslettcommented, Apr 11, 2019

1.7.5 is the latest release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - gulp doesn't work in frontend-maven-plugin 1.4 -
gulp doesn't work in frontend -maven-plugin 1.4 ... Following configuration worked ok in 1.3, but doesn't work in 1.4. Pom config: <project xmlns="http:// ......
Read more >
frontend-maven-plugin fails npm install - Stack Overflow
Then I switched back to <nodeVersion>v12.14.1</nodeVersion> and re-ran the mvn clean install and it worked. Share.
Read more >
Spring MVC | Samer Abdelkafi Blog
Add frontend maven Plugin. Frontend plugin install node and npm and It lets you run Bower and Gulp. Add the xml bellow to...
Read more >
Integrate Gulp on a Maven managed project
Add frontend maven Plugin · Add front-end dependencies · Add Glup module dependencies · Add a Gulp execution file · Configure Spring to...
Read more >
How to Incorporate Front End Builds into OSGi Bundles
The frontend-maven-plugin is made to coordinate the build of Front End build technologies, including Gulp, Bower, NPM and Grunt through a ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found