Skip to content

"Webpack failed to start" exception is non-informative #12846

Closed

Description

@Artur-

Description of the bug

If webpack fails to startup for whatever reason you see the following in the browser on startup

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Jan 25 15:47:16 EET 2022
There was an unexpected error (type=Internal Server Error, status=500).
java.lang.IllegalStateException: Webpack exited prematurely
com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: Webpack exited prematurely
	at com.vaadin.flow.server.VaadinService.handleExceptionDuringRequest(VaadinService.java:1616)
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1579)
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:299)
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:109)

In the server logs you see the same unless you realize to scroll far enough up to find the webpack output.

Expected behavior

The webpack output causing the failure should be included in the exception so you see it both in the server logs and in the browser

Minimal reproducible example

vaadin init --latest fail-webpack
cd fail-webpack
echo "f<>ail" > webpack.config.js 
mvn

Versions

  • Vaadin / Flow version: 23 alpha 3

Activity

  1. added a commit that references this issue on Jan 26, 2022
    ed961fb
  2. added a commit that references this issue on Jan 26, 2022
    4429a8f
  3. vaadin-bot commented on Feb 2, 2022

    @vaadin-bot
    Collaborator

    This ticket/PR has been released with platform 23.0.0.beta1 and is also targeting the upcoming stable 23.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions