CreateProcess error = 193,%1不是有效的Win32应用程序 - > [帮助1]

时间:2016-11-02 21:55:15

标签: angularjs node.js maven

在maven中运行exec-npm-update时,我收到以下错误 CreateProcess error = 193,%1不是有效的Win32应用程序 - > [帮助1]

以下是pom文件的片段。

<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>

4 个答案:

答案 0 :(得分:12)

发生此问题是因为我使用的角度版本是1.5。

将可执行文件从npm更改为npm.cmd解决了这个问题!

void textBox1_TextChanged(object sender, EventArgs e)
{
    SetBoundsCore(Left, Top, Width, Height, BoundsSpecified.Size);
}

答案 1 :(得分:3)

我遇到了同样的问题,回答你需要提供npm.cmd而不是npm

答案 2 :(得分:1)

如果您希望运行shell或命令提示符命令,而与环境无关。我说的是npm.cmd(windows),npm.sh(linux)部分。

将maven-exec-plugin降级到1.4.0版,以便您可以提及(例如)

<executable>npm</executable>
<executable>ng</executable>

答案 3 :(得分:0)

要解决此问题,请执行以下简单步骤:

步骤1:转到您的SDK目录(c:\ users \ your_PC_name \ appdata \ local \ android \ sdk)并删除platform-tool和.temp

注意:您的SDK目录可能与上面给出的方向不同。

第2步:打开android studio

第3步:点击文件->设置-> android SDK(在系统设置下)-> SDK工具

第4步:下载android SDK平台工具。

安装后,删除的.temp和平台工具将添加到SDK路径中。 通过这些步骤,您的问题将得到解决。