当我遍历到src/main/app/我拥有package.JSON&gruntfile的文件夹结构时,我能够运行npm install并grunt命令.但是当我尝试mvn jetty:run在POM文件存在时运行项目的根文件夹中的属性文件时,它会抛出错误,它无法npm install在文件夹结构中运行src/main/app/.
这是确切的错误:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (n
pminstall) on project my-abc-web: Command execution failed. Cannot
run program "npm" (in directory "C:\Users\Achyut_J01\Documents\GitHub\infras\my-abc\my-abc-web\src\main\app"): CreatePro
cess error=2, The system cannot find the file specified -> [Help 1]
Run Code Online (Sandbox Code Playgroud)
这是一台Windows机器.
在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>
Run Code Online (Sandbox Code Playgroud)