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

frontend-maven-plugin install node not run in windows

Open yuluo-yx opened this issue 7 months ago • 2 comments
trafficstars

my pom:

 <plugin>
      <groupId>com.github.eirslett</groupId>
      <artifactId>frontend-maven-plugin</artifactId>
      <version>1.11.0</version>
      <executions>
          <execution>
              <id>install node and npm</id>
              <goals>
                  <goal>install-node-and-npm</goal>
              </goals>
              <configuration>
                  <nodeVersion>${node.version}</nodeVersion>
                  <npmVersion>${npm.version}</npmVersion>
                  <workingDirectory>ui</workingDirectory>
                  <nodeDownloadRoot>http://npmmirror.com/mirrors/node/</nodeDownloadRoot>
                  <npmDownloadRoot>http://npmmirror.com/mirrors/npm/</npmDownloadRoot>
              </configuration>
          </execution>

          <execution>
              <id>npm install</id>
              <goals>
                  <goal>npm</goal>
              </goals>
              <configuration>
                  <arguments>install</arguments>
                  <workingDirectory>ui</workingDirectory>
              </configuration>
          </execution>

          <execution>
              <id>npm build</id>
              <goals>
                  <goal>npm</goal>
              </goals>
              <phase>generate-resources</phase> 
              <configuration>
                  <arguments>run build</arguments>
                  <workingDirectory>ui</workingDirectory>
              </configuration>
          </execution>
      </executions>
  </plugin>

log:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:npm (install pnpm) on project spring-ai-alibaba-studio: Failed to run task: 'npm install -g pnpm' failed. java.io.IOException: Cannot run program "D:\open_sources\spring-ai-alibaba\spring-ai-alibaba-studio\ui\node\node.exe" (in directory "D:\open_sources\spring-ai-alibaba\spring-ai-alibaba-studio\ui"): CreateProcess error=193, %1 不是有效的 Win32 应用程序。 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :spring-ai-alibaba-studio

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:npm (install pnpm) on project spring-ai-alibaba-studio: Failed to run task: 'npm install -g pnpm' failed. java.io.IOException: Cannot run program "D:\open_sources\spring-ai-alibaba\spring-ai-alibaba-studio\ui\node\node.exe" (in directory "D:\open_sources\spring-ai-alibaba\spring-ai-alibaba-studio\ui"): CreateProcess error=193, %1 不是有效的 Win32 应用程序。 -> [Help 1]

it is means:

is not a valid Win32 application. ->

Is there any solution?

yuluo-yx avatar Apr 20 '25 03:04 yuluo-yx