1

i have a web application using java and angular for front

a few days ago i migrate from ng5 to ng7 and start to use npm instead of yarn package manager. before migration everything was all right but after that when i run spring-boot:run goal i get the err below

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.5:npm (angularcli build dev) on project ... : Failed to run task: 'npm run build' failed

befor this err i get an err about angular that says

no such file or directory, open '/Users/nariman/Documents/IdeaProject/yadaki/node_modules/jquery/dist/jquery.min.js'

i add jquery dependency in my package.json but there is something i can't understand sometimes when i search node_module package i have JQuery folder(with Capital Q) that doesn't have dist folder in it (so application build failed) and sometimes there is jquery folder (with normal q) that has a dist folder and the application completely build

i use frontend-maven-plugin

pom.xml

<plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>1.7.5</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>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                    </execution>

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

package.json

"jquery": "3.2.1", 

angular-version : 7.2.4 node-version : 10.15.3 npm-version : 6.9.0

0 Answers0