eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.2k stars 867 forks source link

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm at windows 11 #1079

Open VanitaDhanagar opened 1 year ago

VanitaDhanagar commented 1 year ago

What is the current behavior? "npm install" called by frontend-maven-plugin fails while "npm install" by hand works

If the current behavior is a bug, please provide the steps to reproduce.

I have following file:

section in pom.xml

<plugins>
        <plugin>
            <groupId>com.github.eirslett</groupId>
            <artifactId>frontend-maven-plugin</artifactId>
            <version>1.6</version>
            <executions>
                <execution>
                    <id>install node and npm</id>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>install-node-and-npm</goal>
                    </goals>
                    <configuration>
                        <nodeVersion>v6.3.1</nodeVersion>
                        <npmVersion>3.10.3</npmVersion>
                    </configuration>
                </execution>
                <execution>
                    <id>npm install</id>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>npm</goal>
                    </goals>
                    <configuration>
                        <arguments>--userconfig ${basedir}/.npmrc install</arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>

.npmrc

@sap:registry=https://npm.sap.com/ What is the expected behavior?

NPM INSTALL should run fine.

web 2.0.0 .......................................... FAILURE [ 1.516 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 48.200 s [INFO] Finished at: 2023-04-10T12:19:47+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm install) on project web: Failed to run task: 'npm --userconfig C:\Users---\cf-espm8\cloud-cf-espm\web/.npmrc install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: -1073741819 (Exit value: -1073741819) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm install) on project web: Failed to run task at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)

Please mention your frontend-maven-plugin and operating system version.

frontend-maven-plugin: latest 1.6 os: windows 11 java: openjdk 11 maven: 3.6.0

reda-alaoui reacted with thumbs up emoji