Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Executing goal indstall-node-and-npm error #128

Open
SigurdMoth opened this issue Jul 27, 2020 · 2 comments
Open

Executing goal indstall-node-and-npm error #128

SigurdMoth opened this issue Jul 27, 2020 · 2 comments

Comments

@SigurdMoth
Copy link

I tried to do this tutorial with a friend but we got stuck due to something either being too implicit or wrong (outdated?).

We more specifically couldn't find a way to complete "Loading JavaScript Module".
If we follow the steps exactly as they are stated, we receive errors about executing its goal install-node-and-npm, npm and webpack from the eirslett plugin / repository.

@pablozoani
Copy link

pablozoani commented Nov 5, 2020

I am having the same issue.

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.9.1:install-node-and-npm (default-cli) on project spring-react: The parameters 'nodeVersion' for goal com.github.eirslett:frontend-maven-plugin:1.9.1:install-node-and-npm are missing or invalid

The point is that the nice tutorial doesn't work. :'(

@terylla
Copy link

terylla commented Dec 14, 2020

@pablozoani @SigurdMoth
Hey guys! Not sure if you guys are still working on this. I think it has to do with how you did the plugin!

Apparently, you're supposed to do it like this:

<plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.9.1</version>
                <configuration>
                    <installDirectory>target</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <!-- optional: you don't really need execution ids, but it looks nice in your build log. -->
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>

                        <configuration>
                            <nodeVersion>v15.2.1</nodeVersion>
                            <!-- optional: with node version greater than 4.0.0 will use npm provided by node distribution -->
                            <npmVersion>6.14.9</npmVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>install</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>webpack build</id>
                        <goals>
                            <goal>webpack</goal>
                        </goals>
                    </execution>
                </executions>
  </plugin>

...I know. It took me hours to figure it out because it wasn't in the tutorials. Good luck!!

UgmaDevelopment added a commit to UgmaDevelopment/tut-react-and-spring-data-rest that referenced this issue Jan 14, 2021
It looks like, to maintain sanity, the configuration for the
frontend-maven-plugin was defined in the root tutorial pom and the
configuration is inherited by all the submodules, like `basic`.

The problem was that one following along with the project needs that
configuration.

Now, we show the full configuration instead by including the
frontend-maven-plugin configuration from the root POM instead of
from `basic`'s POM.

Should resolve some concerns described in issues  spring-attic#124, spring-attic#128.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants