Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-lumo-styles" has already been used with this registry #7956

Open
Mehafooz opened this issue Oct 8, 2024 · 4 comments

Comments

@Mehafooz
Copy link

Mehafooz commented Oct 8, 2024

Description

In my angular app im trying to use vaadin date picker component for that in my package json
{
@vaadin/date-picker:24.4.8
some-other-library:x.x.x
}

so here my some other library aslo has some vaadin dependencies and vaadin date picker also have the lumo style dependecies so bcz of the two different version of lumo styles my app is breaking with the below error.

Uncaught NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-lumo-styles" has already been used with this registry

Expected outcome

how to resolve them

Minimal reproducible example

Steps to reproduce

if we some other old vaadin components library vaadin-date-picker:4.3.0 and if im using newer version also then imgetting the above error

Environment

Vaadin version(s): v24
OS: window s

Browsers

No response

@Mehafooz
Copy link
Author

Mehafooz commented Oct 8, 2024

@Artur- is there any workaround available for this

@web-padawan
Copy link
Member

If some old library depends on @vaadin/vaadin-date-picker v4.3.0 (which is an outdated version created for Vaadin 14) you need to check if there is a Vaadin 24 compatible version of that library, or contact its maintainer to create one.

@Mehafooz
Copy link
Author

Mehafooz commented Oct 8, 2024

Hi @web-padawan The problem is the old library(with older vaadin version ) has dependency @vaadin/[email protected] and when im trying to installing the @vaadin/date-picker:24.4.8 it has dependency of @vaadin/[email protected] , so bcz of that im getting this error 'CustomElementRegistry': the name "vaadin-lumo-styles" has already been used with this registry.

@web-padawan
Copy link
Member

Starting with Vaadin 20 we changed all components to use unified version. Mixing different versions of Vaadin components is not supported. This is why you need to make sure your dependencies depend on ^24.0.0 in package.json.

While it's possible to add "overrides" in package.json and lock the @vaadin/vaadin-lumo-styles version, there can be other problems e.g. in Vaadin 14 the vaadin-date-picker also includes vaadin-text-field which could also break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants