Misleading error message when vaadin-maven-plugin is missing for npm modules
See original GitHub issueWhen migrating from V11 to V14 and running in npm mode, I got the following error message
Caused by: java.lang.IllegalStateException: Couldn't find the definition of the element with tag 'root-layout' in any template file declared using '@JsModule' annotations. Check the availability of the template files in your WAR file or provide alternative implementation of the method getTemplateContent() which should return an element representing the content of the template file
This occurred even when the root-layout.js
had been created, and imported with @JsModule('src/root-layout.js');
.
The reason turned out to be that this plugin and config was missing from the pom
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>validate</goal>
<goal>build-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
The error message could be improved to detect when this whole part of the build process is missing.
Versions
Platform 14.0.0.alpha3 npm 6.9.0 node v11.9.0 vaadin-spring-boot-starter 14.0.0.alpha3
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
maven - New Vaadin 14 app fails to run, error ... - Stack Overflow
I received the following error message on the console. [ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:14.0.0:prepare-frontend ( ...
Read more >Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >npm-install-missing
This module will attempt to reinstall any missing dependencies. It can be called via the command line or used programmatically.
Read more >http-errors - npm
Error Properties · expose - can be used to signal if message should be sent to the client, defaulting to false when status...
Read more >npm-check
Check for outdated, incorrect, and unused dependencies.. Latest version: 6.0.1, ... Works on your globally installed packages too, via -g .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Manual migration will get some instructions later on, but the plan is to create a migration tool during platform beta which will handle for instance this case #5037
This should not be valid anymore: we have moved the logic from maven plugin to the server init phase meaning that if the plugin has not been executed then it will be done by the server itself. You have to make sure only that you are running NPM mode.
So :