You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of Storybook 9 (using rc.0 atm), i've noticed the following console error:
lit-html.ts:226 Multiple versions of Lit loaded. Loading multiple versions is not recommended. See https://lit.dev/msg/multiple-versions for more information.
I traced this to lit-html being loaded twice: once by storybook itself, and once because we use Lit for our web components.
@shilman Perhaps consider not bundling lit-html with Storybook and instead make it a peerDependency?
** Disclaimer** This information might be inaccurate, due to it being generated automatically
This issue can be resolved by making lit-html a peer dependency in Storybook's web-components framework package. Changes needed: 1. In code/frameworks/web-components-vite/package.json, move lit-html from dependencies to peerDependencies 2. Update the version range to match Lit's recommended version: "lit-html": "^2.0.0" 3. Add lit-html to peerDependenciesMeta as optional: json "peerDependenciesMeta": { "lit-html": { "optional": true } } This will allow projects to use their own version of lit-html without conflicts with Storybook's bundled version.
About Greptile
This response provides a starting point for your research, not a precise solution.
Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
Describe the bug
As of Storybook 9 (using rc.0 atm), i've noticed the following console error:
I traced this to lit-html being loaded twice: once by storybook itself, and once because we use Lit for our web components.
@shilman Perhaps consider not bundling lit-html with Storybook and instead make it a peerDependency?
Reproduction link
http://localhost:6006/?path=/story/actions-button--basic
Reproduction steps
lit-html only outputs the warning when in dev mode, so i can't link to our production storybook.
System
Additional context
No response
The text was updated successfully, but these errors were encountered: