Error compiling vaadin 14.4.2 application in production mode

Hi, i’m running clean package -Pproduction maven goal on my vaadin 14.4.2 application,

the build in production mode does not complete.

[ERROR]
 Failed to execute goal com.vaadin:vaadin-maven-plugin:14.4.2:build-frontend (default) on project centrico: Webpack process exited with non-zero exit code.
[ERROR]
 Stderr: ''
[ERROR]
 -> [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/MojoExecutionException

In dedelopment mode the build complete properly.

Have you any ideas on what is the problem ?

Hi, any ideas ?

Thanks

Giovanni Adobati:
Hi, any ideas ?

Thanks

i tried cleaning the project, deleting node_modules folder and package-lock.json

but nothing, i get the same error

  6 | //# sourceMappingURL=main-es5.728d41b72b1aea710e5c.js.map
    at Parser._raise (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:790:17)
    at Parser.raiseWithData (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:783:17)
    at Parser.raise (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:777:17)
    at ScopeHandler.checkRedeclarationInScope (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:4915:12)
    at ScopeHandler.declareName (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:4881:12)
    at Parser.registerFunctionStatementId (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:12383:16)
    at Parser.parseFunction (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:12363:12)
    at Parser.parseFunctionStatement (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:11987:17)
    at Parser.parseStatementContent (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:11677:21)
    at Parser.parseStatement (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:11639:17)
    at Parser.parseBlockOrModuleBlockBody (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:12221:25)
    at Parser.parseBlockBody (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:12207:10)
    at Parser.parseTopLevel (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:11570:10)
    at Parser.parse (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:13381:10)
    at parse (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/parser/7.12.5/node_modules/@babel/parser/lib/index.js:13434:38)
    at parser (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/core/7.12.3/node_modules/@babel/core/lib/parser/index.js:54:34)
    at parser.next (<anonymous>)
    at normalizeFile (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/core/7.12.3/node_modules/@babel/core/lib/transformation/normalize-file.js:99:38)
    at normalizeFile.next (<anonymous>)
    at run (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/core/7.12.3/node_modules/@babel/core/lib/transformation/index.js:31:50)
    at run.next (<anonymous>)
    at Function.transform (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/@babel/core/7.12.3/node_modules/@babel/core/lib/transform.js:27:41)
    at transform.next (<anonymous>)
    at step (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/gensync/1.0.0-beta.2/node_modules/gensync/index.js:261:32)
    at /Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/gensync/1.0.0-beta.2/node_modules/gensync/index.js:273:13
    at async.call.result.err.err (/Users/ado2000/tutto/Ado2k.com snc/Progetti/Centrico Sviluppo/Centrico-Dev/centrico-client/node_modules/.pnpm/registry.npmjs.org/gensync/1.0.0-beta.2/node_modules/gensync/index.js:223:11)
 @ ../target/frontend/generated-flow-imports.js?babel-target=es5 116:0-55
[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD FAILURE
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time:  01:22 min
[INFO]
 Finished at: 2020-11-13T14:24:30+01:00
[INFO]
 ------------------------------------------------------------------------
[ERROR]
 Failed to execute goal com.vaadin:vaadin-maven-plugin:14.4.2:build-frontend (default) on project centrico: Webpack process exited with non-zero exit code.
[ERROR]
 Stderr: ''
[ERROR]
 -> [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/MojoExecutionException

Have you any ideas on what is the problem ?

what do u have in that plugin? something like

 <plugin>
                        <groupId>com.vaadin</groupId>
                        <artifactId>vaadin-maven-plugin</artifactId>
                        <version>${vaadin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>build-frontend</goal>
                                </goals>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>

if it is something related to pnpm, a -debug.log (i don’t remember the exactly name) file should have been created in your project path with the reason

jose luis romero:
what do u have in that plugin? something like

 <plugin>
                        <groupId>com.vaadin</groupId>
                        <artifactId>vaadin-maven-plugin</artifactId>
                        <version>${vaadin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>build-frontend</goal>
                                </goals>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>

if it is something related to pnpm, a -debug.log (i don’t remember the exactly name) file should have been created in your project path with the reason

Thanks for the reply,

i use this configuration in my pom

			<plugin>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-maven-plugin</artifactId>
				<version>${vaadin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-frontend</goal>
						</goals>
						<phase>compile</phase>
					</execution>
				</executions>
				<configuration>
					<pnpmEnable>true</pnpmEnable>
				</configuration>
			</plugin>

i tried with and without pnpm but i receive the same error.