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

匿名 (未验证) 提交于 2019-12-03 02:31:01

问题:

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> 

回答1:

This problem happened because the angular version I am using is 1.5.

changing the executable from npm to npm.cmd solved the problem!

<execution>                 <id>exec-npm-update</id>                 <phase>generate-sources</phase>                 <configuration>                   <workingDirectory>${uiResourcesDir}</workingDirectory>                   <executable>npm.cmd</executable>                   <arguments>                     <argument>update</argument>                   </arguments>                 </configuration>                 <goals>                   <goal>exec</goal>                 </goals>               </execution> 


回答2:

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



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!