Taking your Application into Production --------Please help !!!

I would like to publish my applikation ionline with the Produktive mode by following the following documentation:https://vaadin.com/docs/flow/production/tutorial-production-mode-basic.html
and entering the following command “mvn clean package -Pproduction-mode” I encounter this error:

Scanning for projects...
[INFO]
 
[INFO]
 -----------------< .de.login:login-test-app >------------------
[INFO]
 Building login-test-app 1.0-SNAPSHOT
[INFO]
 --------------------------------[ war ]
---------------------------------
[INFO]
 
[INFO]
 --- maven-clean-plugin:2.5:clean (default-clean) @ login-test-app ---
[INFO]
 Deleting C:\Users\\Documents\muster-workspace\login-test-app\target
[INFO]
 
[INFO]
 --- vaadin-maven-plugin:13.0.0:copy-production-files (default) @ login-test-app ---
[INFO]
 Copying web application files to 'C:\Users\\Documents\muster-workspace\login-test-app\target\frontend'
[INFO]
 
[INFO]
 --- maven-resources-plugin:2.6:resources (default-resources) @ login-test-app ---
[INFO]
 Using 'UTF-8' encoding to copy filtered resources.
[INFO]
 Copying 1 resource
[INFO]
 
[INFO]
 --- maven-compiler-plugin:3.1:compile (default-compile) @ login-test-app ---
[INFO]
 Changes detected - recompiling the module!
[INFO]
 Compiling 8 source files to C:\Users\\Documents\muster-workspace\login-test-app\target\classes
[INFO]
 
[INFO]
 --- vaadin-maven-plugin:13.0.0:package-for-production (default) @ login-test-app ---
[WARNING]
 The translated URL 'frontend://bower_components/vaadin-upload/theme/lumo/vaadin-upload-file.html' has no corresponding file on the filesystem, the file is addressed by path='C:\Users\\Documents\muster-workspace\login-test-app\target\frontend\bower_components\vaadin-upload\theme\lumo\vaadin-upload-file.html'
[INFO]
 Installing required frontend tools to 'C:\Users\\Documents\muster-workspace\login-test-app\target'
[INFO]
 Running 'yarn install' in C:\Users\\Documents\muster-workspace\login-test-app\target
[INFO]
 yarn install v1.15.2
[INFO]
 [1/4]
 Resolving packages...
[INFO]
 [2/4]
 Fetching packages...
[INFO]
 [3/4]
 Linking dependencies...
[ERROR]
 warning "polymer-build > polymer-project-config@3.13.0" has incorrect peer dependency "polymer-analyzer@^3.0.0-pre.17 || ^3.0.0".
[INFO]
 [4/4]
 Building fresh packages...
[ERROR]
 error C:\\tks7rt\Documents\muster-workspace\login-test-app\target\node_modules\iltorb: Command failed.
[INFO]
 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[ERROR]
 Exit code: 1
[ERROR]
 Command: node ./scripts/install.js || node-gyp rebuild
[ERROR]
 Arguments: 
[ERROR]
 Directory: C:\Users\\Documents\muster-workspace\login-test-app\target\node_modules\iltorb
[ERROR]
 Output:
[ERROR]
 info looking for cached prebuild @ C:\Users\\AppData\Roaming\npm-cache\_prebuilds\0de438-iltorb-v2.4.0-node-v64-win32-x64.tar.gz
[ERROR]
 http request GET https://github.com/MayhemYDG/iltorb/releases/download/v2.4.0/iltorb-v2.4.0-node-v64-win32-x64.tar.gz
[ERROR]
 http request Proxy setup detected (Host: rb-proxy-special.bosch.com, Port: 8080, Authentication: No) Tunneling with httpsOverHttps
[ERROR]
 WARN install tunneling socket could not be established, cause=write EPROTO 11412:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:252:
[ERROR]
 WARN install 
[ERROR]
 
[ERROR]
 C:\Users\\Documents\muster-workspace\login-test-app\target\node_modules\iltorb>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild ) 
[ERROR]
 gyp info it worked if it ends with ok
[ERROR]
 gyp info using node-gyp@3.8.0
[ERROR]
 gyp info using node@10.15.3 | win32 | x64
[ERROR]
 gyp ERR! configure error 
[ERROR]
 gyp ERR! stack Error: Command failed: C:\Users\\AppData\Local\Programs\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]
;
[ERROR]
 gyp ERR! stack   File "<string>", line 1
[ERROR]
 gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3]
;
[ERROR]
 gyp ERR! stack                                ^
[ERROR]
 gyp ERR! stack SyntaxError: invalid syntax
[ERROR]
 gyp ERR! stack 
[ERROR]
 gyp ERR! stack     at ChildProcess.exithandler (child_process.js:294:12)
[ERROR]
 gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
[ERROR]
 gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
[ERROR]
 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
[ERROR]
 gyp ERR! System Windows_NT 10.0.17134
[ERROR]
 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
[ERROR]
 gyp ERR! cwd C:\Users\\Documents\muster-workspace\login-test-app\target\node_modules\iltorb
[ERROR]
 gyp ERR! node -v v10.15.3
[ERROR]
 gyp ERR! node-gyp -v v3.8.0
[ERROR]
 gyp ERR! not ok
[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD FAILURE
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time: 45.017 s
[INFO]
 Finished at: 2019-04-26T14:24:40+02:00
[INFO]
 ------------------------------------------------------------------------
[ERROR]
 Failed to execute goal com.vaadin:vaadin-maven-plugin:13.0.0:package-for-production (default) on project login-test-app: Execution default of goal com.vaadin:vaadin-maven-plugin:13.0.0:package-for-production failed: Failed to install required frontend dependencies: 'yarn install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [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/PluginExecutionException

Hier ist how my POM look

<?xml version="1.0" encoding="UTF-8"?>
<modelVersion>4.0.0</modelVersion>
<groupId>com.de.login</groupId>
<artifactId>login-test-app</artifactId>
<name>login-test-app</name>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <failOnMissingWebXml>false</failOnMissingWebXml>

    <vaadin.version>13.0.3</vaadin.version>
</properties>

<repositories>
    <!-- Maven central - reduces first-time build time -->
    <repository>
        <id>central</id>
        <url>https://repo1.maven.org/maven2/</url>
        <snapshots><enabled>false</enabled></snapshots>
    </repository>

    <!-- Repository used by many Vaadin add-ons -->
    <repository>
         <id>Vaadin Directory</id>
         <url>http://maven.vaadin.com/vaadin-addons</url>
    </repository>
    <!-- Repository needed for prerelease versions of Vaadin -->
    <repository>
        <id>vaadin-prereleases</id>
        <url>https://maven.vaadin.com/vaadin-prereleases</url>
    </repository>
</repositories>

<pluginRepositories>
    <!-- Maven central - reduces first-time build time -->
    <pluginRepository>
        <id>central</id>
        <url>https://repo1.maven.org/maven2/</url>
        <snapshots><enabled>false</enabled></snapshots>
    </pluginRepository>
    <!-- Repository needed for prerelease versions of Vaadin -->
    <pluginRepository>
        <id>vaadin-prereleases</id>
        <url>https://maven.vaadin.com/vaadin-prereleases</url>
        <snapshots><enabled>false</enabled></snapshots>
    </pluginRepository>
</pluginRepositories>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <artifactId>vaadin-bom</artifactId>
            <type>pom</type>
            <scope>import</scope>
            <version>${vaadin.version}</version>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-core</artifactId>
    </dependency>

    <!-- Added to provide logging output as Flow uses -->
    <!-- the unbound SLF4J no-operation (NOP) logger implementation -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
    </dependency>

    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>
    
</dependencies>

<build>
    <plugins>
        <!-- Jetty plugin for easy testing without a server -->
        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.4.11.v20180605</version>
            <configuration>
                <scanIntervalSeconds>1</scanIntervalSeconds>
            </configuration>
        </plugin>
    </plugins>
</build>

<profiles>
    <profile>
        <!-- Production mode can be activated with either property or profile -->
        <id>production-mode</id>

        <dependencies>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>flow-server-production-mode</artifactId>
                <version>1.4.2</version>
            </dependency>
        </dependencies>


				<build>
				    <plugins>
				        <plugin>
		            <groupId>com.vaadin</groupId>
		            <artifactId>vaadin-maven-plugin</artifactId>
		            <version>13.0.0</version>
		            <configuration>
		                <nodePath>C:\Program Files\nodejs\node.exe</nodePath>
		                <yarnPath>C:\Program Files\Yarn\bin\yarnpkg.cmd</yarnPath>
		            </configuration>
		            <executions>
		                <execution>
		                    <goals>
		                        <goal>copy-production-files</goal>
		                        <goal>package-for-production</goal>
		                    </goals>
		                </execution>
		            </executions>
		        </plugin>
		    </plugins>
		</build>


    </profile>
</profiles>

Just had a few in your log file…
Did you check your SSL and proxy is working right?

"[ERROR]
WARN install tunneling socket could not be established, cause=write EPROTO 11412:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:252:
"

Hi.

Have you tried letting the plugin download yarn and node?

For some reason you are not getting the pre-compiled binary of iltorb during installation
and actually building it requires Python 2.7

what version is the target\node_modules\iltorb? I’m getting 2.4.0

Also my target/package.json dependencies are:

  "devDependencies": {
    "babel-core": "6.26.3",
    "babel-plugin-external-helpers": "6.22.0",
    "babel-preset-env": "1.6.1",
    "babel-preset-minify": "0.4.1",
    "css-slam": "2.0.2",
    "del": "3.0.0",
    "gulp-rename": "1.2.2",
    "gulp": "3.9.1",
    "gulp-if": "2.0.2",
    "gulp-ignore": "2.0.2",
    "gulp-string-replace": "1.0.0",
    "gulp-gzip": "1.4.2",
    "gulp-brotli": "1.2.1",
    "html-minifier": "3.5.8",
    "polymer-build": "2.1.1",
    "merge-stream": "1.0.1",
    "vinyl": "2.1.0",
    "parse5": "4.0.0",
    "gulp-tap": "1.0.1",
    "hasha": "3.0.0"
  }

if there comes some differences for some reason.

  • Mikael

thank you all! the problem was the proxy of my company