Skip to content

frontend-maven-plugin install node not run in windows #1179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yuluo-yx opened this issue Apr 20, 2025 · 2 comments
Open

frontend-maven-plugin install node not run in windows #1179

yuluo-yx opened this issue Apr 20, 2025 · 2 comments

Comments

@yuluo-yx
Copy link

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
Copy link
Author

yuluo-yx commented Apr 20, 2025

那有办法修复这个问题吗?比如说在下载前判断平台?同样的配置在 mac 下是可用的,有点奇怪的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@yuluo-yx and others