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.

[V20] Duplicate Lumo version when using npm

See original GitHub issue

Description 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:

  1. download a V20 project from start.vaadin.com
  2. update version in pom.xml to 20.0.0.alpha5
  3. run with mvn spring-boot:run
  4. add vaadin.pnpm.enable = false
  5. run rm -rf node_modules target
  6. 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:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
web-padawancommented, Aug 12, 2021

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.

0reactions
vaadin-botcommented, Aug 19, 2021

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

Read more comments on GitHub >

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

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