I’m trying to use the standalone migration tool (v 2.2.0) to migrated a 14 project that has been running in bower compatibility mode to the new system, now that 14.2 self-installs node.js and npm.
<link rel="import" href="../bower_components/vaadin-charts/vaadin-chart-default-theme.html">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
file:///private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/styles/shared-styles.html(104,2) warning [import-ignored]
- Import could not be loaded and will be ignored.
Unhandled Rejection at: Promise Promise {
<rejected> TypeError: url.replace is not a function
at Object.replaceHtmlExtensionIfFound (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/src/urls/util.ts:32:14)
at Object.generatePackageJson (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/src/package-manifest.ts:205:24)
at Object.<anonymous> (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/src/convert-package.ts:133:23)
at Generator.next (<anonymous>)
at fulfilled (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/lib/convert-package.js:17:58)
} reason: TypeError: url.replace is not a function
at Object.replaceHtmlExtensionIfFound (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/src/urls/util.ts:32:14)
at Object.generatePackageJson (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/src/package-manifest.ts:205:24)
at Object.<anonymous> (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/src/convert-package.ts:133:23)
at Generator.next (<anonymous>)
at fulfilled (/private/var/folders/p6/gr6fbv_d6d71q4dywb23j724000_9t/T/migration3451130760843302237/node_modules/polymer-modulizer/lib/convert-package.js:17:58)
Exception in thread "main" java.lang.IllegalStateException: Failed to load class 'com.vaadin.flow.component.dependency.HtmlImport' in custom classloader
at com.vaadin.flow.migration.ClassPathIntrospector.loadClassInProjectClassLoader(ClassPathIntrospector.java:111)
at com.vaadin.flow.migration.RewriteLegacyAnnotationsStep.rewrite(RewriteLegacyAnnotationsStep.java:95)
at com.vaadin.flow.migration.Migration.rewrite(Migration.java:470)
at com.vaadin.flow.migration.Migration.migrate(Migration.java:261)
at com.vaadin.flow.migration.MigrationTool.doMigration(MigrationTool.java:156)
at com.vaadin.flow.migration.MigrationTool.runMigration(MigrationTool.java:139)
at com.vaadin.flow.migration.MigrationTool.main(MigrationTool.java:77)
Caused by: java.lang.ClassNotFoundException: com.vaadin.flow.component.dependency.HtmlImport
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at com.vaadin.flow.server.scanner.ReflectionsClassFinder.loadClass(ReflectionsClassFinder.java:85)
at com.vaadin.flow.migration.ClassPathIntrospector.loadClassInProjectClassLoader(ClassPathIntrospector.java:109)
... 6 more
I think the first part about url.replace is ignorable warning (well, it’ll have to be dealt with at some point, but shouldn’t be fatal) but the ClassNotFound exception seems to be real, as migration stops progressing at that point and it is clear that it hasn’t done everything that it should. Obviously, the -d argument includes flow-server, so I’m not sure what’s going on here, why it cannot find the class, or even what it is really doing at this point in the conversion process. In any case, it rewrites no annotations, though it seems to have done at least some of the frontend conversions.
We’re using gradle, so the maven migration path isn’t applicable.