question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Misleading error message when vaadin-maven-plugin is missing for npm modules

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
plekucommented, May 8, 2019

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

0reactions
denis-anisimovcommented, Jul 1, 2019

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 :

  • verify that this can be reproduced with the latest snapshot
  • close the ticket if it can’t be reproduced or add more details about the current behavior if it’s still valid
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found