frontend-maven-plugin icon indicating copy to clipboard operation
frontend-maven-plugin copied to clipboard

CreateProcess error=193, %1 is not a valid Win32 application

Open sampath-karupakula opened this issue 8 years ago • 9 comments

Getting following error while doing build. platform details:

WIndows-10(64 bit). nodejs angular2 cli. maven 3

I am trying to do following activities:

` <groupId>com.github.eirslett</groupId> <artifactId>frontend-maven-plugin</artifactId> 1.0 <workingDirectory>app</workingDirectory> <installDirectory>app/temp</installDirectory> install node and npm install-node-and-npm generate-resources <nodeVersion>v6.3.1</nodeVersion> <npmVersion>3.9.5</npmVersion>

                <!-- install CLI if not exist -->
                <execution>
                    <id>npm install -g angular cli</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <phase>generate-resources</phase>
                    <configuration>
                        <arguments>install -g angular-cli</arguments>
                    </configuration>
                </execution>

                <!-- It will execute command "npm install" inside "/angular" directory -->
                <execution>
                    <id>npm install</id>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <phase>generate-resources</phase>
                    <configuration>
                        <arguments>install</arguments>
                    </configuration>
                </execution>
`

sampath-karupakula avatar Oct 08 '16 16:10 sampath-karupakula

Maybe the node.exe it downloaded is corrupt?

eirslett avatar Oct 09 '16 12:10 eirslett

I have the same problem - I have changed in project's pom nodeVersion to the v6.9.1 and npmVersion to the 4.0.3.

rmigacz avatar Nov 23 '16 17:11 rmigacz

I hit this same error when updating from v6.9.1 to v6.9.5. I even tried removing the node directory in my project and reinstalling. My workaround was to copy the node.exe from my program files folder to my project.

aciccarello avatar Feb 13 '17 19:02 aciccarello

please use npm.com instead npm in execution unit of plugin.

mbindu29 avatar Sep 29 '17 01:09 mbindu29

Hi, I had exactly the same issue on my Windows 10 machine this morning. The problem was the result of a corrupt node.exe in my Maven repository. I had to delete the node folder from BOTH my project and my .m2 repo:

delete this folder from your maven repository -> \.m2\repository\com\github\eirslett delete this folder from your application -> <MY_PROJECT>\frontend\src\main\frontend\node then: mvn clean package

I initially tried deleting only the node folder from my application, but maven replaces it with the contents of the corrupt node.exe in the local repo. By deleting both folders, the plugin was forced to go and download a fresh copy of the node.exe to my local repo. Subsequently everything worked fine.

Hope this helps.

nickjagger avatar Apr 27 '18 13:04 nickjagger

Hello,

I had the same problem, this solved the issue:

mvn dependency:purge-local-repository -DmanualInclude=com.github.eirslett:node
mvn clean package

it will delete corrupted node.exe binary and force redownload, which helped.

Karel

lotcz avatar Mar 31 '19 15:03 lotcz

change version on dependency file , same like ur node version installed

ikangurame3 avatar Oct 15 '19 08:10 ikangurame3

I have the same issue but in jenkins. It is not a consistent one, it appears and disappears time to time. @ikangurame3 did changing version help?

saurabh-sp-tripathi avatar Oct 30 '19 22:10 saurabh-sp-tripathi

This just happened to us to today in the latest plugin version.

How exactly can a corrupt download from nodejs.org happen in the first place?

TIBCOrkrajews avatar Apr 18 '23 15:04 TIBCOrkrajews