ninja-keys icon indicating copy to clipboard operation
ninja-keys copied to clipboard

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

Open rubjo opened this issue 2 years ago • 1 comments

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?

rubjo avatar May 02 '22 12:05 rubjo

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

wobsoriano avatar May 08 '22 20:05 wobsoriano