[V20] Duplicate Lumo version when using npm
See original GitHub issueDescription of the bug / feature
When using npm for Vaadin 20, some transitive dependencies are not locked (in particular, vaadin-overlay
).
This causes duplicates as soon as a newer alpha of the web components is released from the monorepo.
Minimal reproducible example
Here is how to reproduce the issue:
- download a V20 project from start.vaadin.com
- update version in
pom.xml
to 20.0.0.alpha5 - run with
mvn spring-boot:run
- add
vaadin.pnpm.enable = false
- run
rm -rf node_modules target
- run with
mvn spring-boot:run
Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-lumo-styles" has already been used with this registry
at eval (webpack-internal:///../node_modules/@vaadin/vaadin-overlay/node_modules/@vaadin/vaadin-lumo-styles/version.js:14:16)
at Module.../node_modules/@vaadin/vaadin-overlay/node_modules/@vaadin/vaadin-lumo-styles/version.js (http://localhost:8080/VAADIN/build/vaadin-0-c4994e564f66ab02f796.cache.js:3549:1)
at __webpack_require__ (http://localhost:8080/VAADIN/build/vaadin-bundle-1882670d596991653229.cache.js:64:30)
at eval (webpack-internal:///../node_modules/@vaadin/vaadin-overlay/node_modules/@vaadin/vaadin-lumo-styles/color.js:6:69)
at Module.../node_modules/@vaadin/vaadin-overlay/node_modules/@vaadin/vaadin-lumo-styles/color.js (http://localhost:8080/VAADIN/build/vaadin-0-c4994e564f66ab02f796.cache.js:3489:1)
at __webpack_require__ (http://localhost:8080/VAADIN/build/vaadin-bundle-1882670d596991653229.cache.js:64:30)
at eval (webpack-internal:///../node_modules/@vaadin/vaadin-overlay/node_modules/@vaadin/vaadin-lumo-styles/mixins/overlay.js:4:67)
at Module.../node_modules/@vaadin/vaadin-overlay/node_modules/@vaadin/vaadin-lumo-styles/mixins/overlay.js (http://localhost:8080/VAADIN/build/vaadin-0-c4994e564f66ab02f796.cache.js:3501:1)
at __webpack_require__ (http://localhost:8080/VAADIN/build/vaadin-bundle-1882670d596991653229.cache.js:64:30)
at eval (webpack-internal:///../node_modules/@vaadin/vaadin-overlay/theme/lumo/vaadin-overlay-styles.js:3:102)```
Expected behavior
All the Vaadin components should use the consistent version (in this case 20.0.0-alpha2
)
Actual behavior
Pinned components use a fixed version (e.g. 20.0.0-alpha2
) but their transitive dependencies might use newer versions when available (e.g. 20.0.0-alpha3
) causing duplicates and conflicts.
Versions:
- Vaadin / Flow version: 20.0.0.alpha5 / Flow 7 alpha
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Using NPM modules with own Vaadin dependencies fails
We are using Vaadin Fusion, and are stuck for the time being with version 19. In this version it is not possible to...
Read more >lumo - npm
A high performance WebGL tile rendering library. Latest version: 0.20.17, last published: 3 years ago. Start using lumo in your project by ...
Read more >Vaadin 14 to 23 Upgrade Instructions
Upgrading from a version before Vaadin 14? Follow the older guides to upgrade to V14 first, and then continue with this guide. You...
Read more >Untitled
Traffic film clip, Joliet movies 10 cinemark, Pstate intel, 5 top interview questions, Netflix release dates jane the virgin, Und bookstore coupon, ...
Read more >Untitled
Amd graphics driver, Uga campus life, Images of cheetahs running. ... Illathalam song download, Ustensiles de cuisine paris 2, Lymph node locations in...
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 Free
Top 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
I would say in theory this problem could also happen in Vaadin 14 if we make a patch release of
vaadin-overlay
. But unlike in the monorepo, we don’t bump versions for individual components on every transitive dependency release.So the fix probably should be backported to prevent such cases, although I’m not sure if this ever happens.
This ticket/PR has been released with platform 14.7.0.beta1 and is also targeting the upcoming stable 14.7.0 version.