Flow: Migration tool doesn't work on Windows 10

Created on 15 Aug 2019  路  1Comment  路  Source: vaadin/flow

Settings

OS: Windows 10;
Vaadin version: migrate from V11 to V14;
Node.js: v10.16.2
npm: 6.10.3

Steps:

  1. download the sample app (perhaps you need change the file extension to .rar);
  2. update the vaadin.version to 14.0.0;
  3. add the vaadin-maven-plugin dependency;
          <!--
                Take care of synchronizing java dependencies and imports in
                package.json and main.js files.
                It also creates webpack.config.js if not exists yet.
            -->
            <plugin>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-maven-plugin</artifactId>
                <version>${vaadin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-frontend</goal>
                            <goal>build-frontend</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
  1. run mvn vaadin:migrate-to-p3

Expected behavior

the P2 template is migrated to P3 and a new file with .js should be generated in the root/frontend folder

Actual behavior

there is a file with .html extension in the root/fronted folder and content inside is incorrect, check below:

<link rel="import" href="bower_components/polymer/polymer-element.html">
<body>
 <dom-module id="ex1-layout"> 
  <template> 
   <div>
    <h1>I'm Header</h1>
   </div> 
   <div id="contentArea"></div> 
   <div>
    <h1>I'm Footer</h1>
   </div> 
  </template> 
  <script>
        class Ex1LayoutTemplate extends Polymer.Element {
            static get is() { return 'ex1-layout' }
        }
        customElements.define(Ex1LayoutTemplate.is, Ex1LayoutTemplate);
    </script> 
 </dom-module>
</body>

checking the build log, there is an error

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Solutions.zip

Low Minor bug investigation p2-to-p3

Most helpful comment

I had the same error.
Workaround: set the environment variable NODE_OPTIONS before doing the conversion.
For example
"export NODE_OPTIONS=--max_old_space_size=4096".

But then I still get this other error:
https://github.com/vaadin/flow/issues/6208

>All comments

I had the same error.
Workaround: set the environment variable NODE_OPTIONS before doing the conversion.
For example
"export NODE_OPTIONS=--max_old_space_size=4096".

But then I still get this other error:
https://github.com/vaadin/flow/issues/6208

Was this page helpful?
0 / 5 - 0 ratings