Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CreateProcess error=193, %1 is not a valid Win32 application -> [Help 1]

When running exec-npm-update in maven , I am getting the following error CreateProcess error=193, %1 is not a valid Win32 application -> [Help 1]

Below is the snippet from pom file.

<execution>
                <id>exec-npm-update</id>
                <phase>generate-sources</phase>
                <configuration>
                  <workingDirectory>${uiResourcesDir}</workingDirectory>
                  <executable>npm</executable>
                  <arguments>
                    <argument>update</argument>
                  </arguments>
                </configuration>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
like image 554
Puneet Avatar asked Nov 02 '16 21:11

Puneet


2 Answers

If you like to run the shell or command prompt commands irrespective of environment. I am talking about npm.cmd (windows), npm.sh (linux) parts.

Downgrade the maven-exec-plugin to Version 1.4.0 so that you can just mention (For e.g.)

<executable>npm</executable>
<executable>ng</executable>
like image 178
Mohan Ram Avatar answered Sep 27 '22 20:09

Mohan Ram


I faced the same issue, as answered you need to provide npm.cmd instead just npm

like image 31
Mahesh Parab Avatar answered Sep 27 '22 20:09

Mahesh Parab