flow: frontend compilation fails after upgrading to vaadin 23.1.0
Description of the bug
After upgrading to vaadin 23.1.0 I ran:
rm -rf target rm -rf node_modules npm i mvn install
When I try to restart tomcat I get the following error:
13 12:57:22,617 http-nio-8080-exec-1 USER: [ERROR] (CustomExceptionHandler.java:36) - Uncaught UI exception
[m java.lang.IllegalStateException: Startup of Webpack failed. Output was:
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
at Command.<anonymous> (/home/bsutton/git/onepub/onepub_vaadin/node_modules/.pnpm/@webpack-cli+serve@1.7.0_8b27d5839a2bdf89ba2338e4c89fea10/node_modules/@webpack-cli/serve/lib/index.js:146:35)
at async Promise.all (index 1)
at async Command.<anonymous> (/home/bsutton/git/onepub/onepub_vaadin/node_modules/.pnpm/webpack-cli@4.9.2_9c3dcbfb57ee5c2fcb4d4b626946cc9c/node_modules/webpack-cli/lib/webpack-cli.js:1674:7)
at com.vaadin.base.devserver.AbstractDevServerRunner.doStartDevModeServer(AbstractDevServerRunner.java:219) ~[vaadin-dev-server-23.1.0.jar:?]
at com.vaadin.base.devserver.AbstractDevServerRunner.runOnFutureComplete(AbstractDevServerRunner.java:171) ~[vaadin-dev-server-23.1.0.jar:?]
at com.vaadin.base.devserver.AbstractDevServerRunner.lambda$new$0(AbstractDevServerRunner.java:162) ~[vaadin-dev-server-23.1.0.jar:?]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
Expected behavior
tomcat should start without an error.
Minimal reproducible example
After upgrading to vaadin 23.1.0 I ran:
rm -rf target rm -rf node_modules npm i mvn install
Versions
- Vaadin / Flow version: 23.1.0
- Java version: OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)
- OS version: Ubuntu: 22.04
- Browser version (if applicable):
- Application Server (if applicable): Apache Tomcat/9.0.36
- IDE (if applicable): eclipse
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 21 (12 by maintainers)
Commits related to this issue
- fix: Update webpack-cli to a latest version Part-of: https://github.com/vaadin/flow/issues/13952 — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/13952 — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/13952 (che... — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/13952 (cher... — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/13952 (cher... — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) (#13959) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/... — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) (#13957) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/... — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) (#13958) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/... — committed to vaadin/flow by mshabarov 2 years ago
- fix: Update webpack-cli to a latest version (#13954) Update webpack-cli to v4.10.0, since 4.9.2 incompatible with @webpack-cli/serve 1.7.0. Part-of: https://github.com/vaadin/flow/issues/13952 (cher... — committed to vaadin/flow by mshabarov 2 years ago
- After updating to Vaadin 23 error occurred that caused system to fail. Helping References: https://github.com/vaadin/flow/commit/468afeee43506d4dc0d2e5f66c34208566a99e27 https://github.com/vaadin/flo... — committed to KellieWatson/PeopleOfSignificance by KellieWatson 2 years ago
- Handle https://github.com/vaadin/flow/issues/13952 without worrying about version upgrades right now. — committed to drbubbletea/guice-quickstart by drbubbletea 9 months ago
Instead of downgrading, maybe upgrading is easier
This issue has been fixed in V23.1.1, V23.0.12 and V22.0.17.
Vaadin 14.8 and 10.0 have no such an issue.
Please let us know if you still experience any issues with
webpack-cliby commenting to this ticket or creating a new one.Will do.
On Fri, 17 June 2022, 6:00 pm Mikhail Shabarov, @.***> wrote:
Since Vaadin 22 is also still maintained, we also need to provide the fix there.
I think this command is problematic:
I ended up with
Note the ^, which seems to result in it still running 1.7.x
I was flailing about somewhat to get this to work so can’t be certain the --save-dev command did the damage.
The change to make in the package.json would be:
Or run
npm i @webpack-cli/serve@1.6.1 --save-devOne thing to note on manual changes to package.json is that you shouldn’t touch the
vaadin{}object as that is used by the framework to check if the dependencies are manually altered or added to the package.json.So if a item and version match in both dependencies and vaadin - dependencies or devDependencies and vaadin - devDependencies then the framework can automatically update or remove dependencies, which it will not do if the item is missing or has another version inside the vaadin object
It would seem that webpack-cli 4.9 is not compatible with cli/serve 1.7 see https://github.com/webpack/webpack-cli/issues/3294
As a workaround before a fix, defining the @webpack-cli/serve package.json dependency to v1.6.1 should fix the initial problem.