gatanaso/multiselect-combo-box-flow

Problem in Vaadin 19.0.4

edgonzalezj opened this issue · 2 comments

Init application and in javavascript console:
Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-text-field" has already been used with this registry at eval (webpack-internal:///../node_modules/multiselect-combo-box/node_modules/@vaadin/vaadin-text-field/src/vaadin-text-field.js:159:16) at Module.../node_modules/multiselect-combo-box/node_modules/@vaadin/vaadin-text-field/src/vaadin-text-field.js (http://localhost:8080/VAADIN/build/vaadin-0-ba2e9436434f77b21e4e.cache.js:6353:1) at webpack_require (http://localhost:8080/VAADIN/build/vaadin-bundle-9511f184cfbdbdb4a949.cache.js:64:30) at eval (webpack-internal:///../node_modules/multiselect-combo-box/node_modules/@vaadin/vaadin-text-field/theme/lumo/vaadin-text-field.js:3:83) at Module.../node_modules/multiselect-combo-box/node_modules/@vaadin/vaadin-text-field/theme/lumo/vaadin-text-field.js (http://localhost:8080/VAADIN/build/vaadin-0-ba2e9436434f77b21e4e.cache.js:6377:1) at webpack_require (http://localhost:8080/VAADIN/build/vaadin-bundle-9511f184cfbdbdb4a949.cache.js:64:30) at eval (webpack-internal:///../node_modules/multiselect-combo-box/theme/lumo/multiselect-combo-box.js:2:115) at Module.../node_modules/multiselect-combo-box/theme/lumo/multiselect-combo-box.js (http://localhost:8080/VAADIN/build/vaadin-0-ba2e9436434f77b21e4e.cache.js:6461:1) at webpack_require (http://localhost:8080/VAADIN/build/vaadin-bundle-9511f184cfbdbdb4a949.cache.js:64:30) at eval (webpack-internal:///../target/frontend/generated-flow-imports.js:92:116)

I try to remove modules, lock.js. clean, installl, but nothing.

If look for duplicates in modules

@vaadin/vaadin-text-field :
[
{
name: '@vaadin/vaadin-text-field',
version: '3.0.2',
from: '@vaadin/vaadin-text-field@3.0.2',
path: 'no-name/@vaadin/vaadin-combo-box'
},
{
name: '@vaadin/vaadin-text-field',
version: '2.8.4',
from: '@vaadin/vaadin-text-field@^2.4.8',
path: 'no-name/multiselect-combo-box/@vaadin/vaadin-combo-box'
}
]

Thanks!!!

To add more context:

  • Vaadin 19 requires vaadin-text-field@3.0.2
  • The component requires vaadin-text-field@^2.4.8

A major change (2 to 3) is done because of breaking change, in that case polymer 2 and IE11 support is dropped.

pnpm, the default in Vaadin 19, is solving the issue by picking 3.0.2 and it's working.
npm is not solving the issue.
The solution is to bump the version of the vaadin components to the major version of the platform.

Hi, unfortunately the component was not updated to work with this particular version of Vaadin. I have just now published an initial version that supports Vaadin 22+. Hopefully you find it useful. 🙏