ssleptsov / ninja-keys

Keyboard shortcuts interface for your website. Working with static HTML, Vanilla JS, Vue, React, Svelte.
https://ninja-keys-demo.vercel.app/
MIT License
1.65k stars 60 forks source link

DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "ninja-header" has already been used with this registry #23

Open rubjo opened 2 years ago

rubjo commented 2 years ago

Hi,

I'm trying to use ninja-keys in a project with latest ninja-keys 1.2.1, latest Vue 3.2.33 and Vite 2.9.6 (using <script setup>).

While running the dev server, I get the warning "reactive-element.ts:66 Multiple versions of Lit loaded. Loading multiple versions is not recommended. See https://lit.dev/msg/multiple-versions for more information." Which might not be a big deal.

...but deployed / in production mode, I'm getting "DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "ninja-header" has already been used with this registry".

Any ideas at all what could be happening here? Are you able to set up ninja-keys using Vue/Vite/<script setup> without errors?

wobsoriano commented 2 years ago

Only getting your error on dev with pnpm workspaces. But seem to work well on prod

Interesting issues

https://github.com/vitejs/vite/issues/7323 https://github.com/vitejs/vite/pull/7379