Skip to content

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

@yuluo-yx

Description

@yuluo-yx

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions