When importing html from solid-js/html while using TypeScript, this error can happen:
node_modules/solid-js/html/types/index.d.ts:1:32 - error TS2307: Cannot find module 'lit-dom-expressions' or its corresponding type declarations.
1 declare const _default: import("lit-dom-expressions").HTMLTag;
~~~~~~~~~~~~~~~~~~~~~
Your Example Website or App
n/a
Steps to Reproduce the Bug or Issue
No simple reproduction yet. I'm refactoring lume right now to use idiomatic solid-js, and classy-solid, and in the process I've removed lit-dom-expressions from @lume/element (because the idea is anyone using html should import it from solid-js/html.
However, removing this explicit dependency on lit-dom-expressions causes the type error.
Hoping I can provide a simple reproduction later.
Expected behavior
solid-js should include dependencies that it depends on. It is missing lit-dom-expressions from dependencies.
Note, I'm still on 1.4, because 1.5 is breaking for lume and I still need to make further refactors to catch up. So, I haven't tested with latest yet, but I see package.json is missing lit-dom-expressions in dependencies.
Screenshots or Videos
n/a
Platform
n/a
Possible Solution
It might be reasonable to add a build step that copies lit-dom-expression types into the repo, and have html get the types from there, instead of from lit-dom-expressions, like with other parts of solid-js that copy files from other packages to avoid having extra "dependencies".
Describe the bug
When importing
html
fromsolid-js/html
while using TypeScript, this error can happen:Your Example Website or App
n/a
Steps to Reproduce the Bug or Issue
No simple reproduction yet. I'm refactoring lume right now to use idiomatic solid-js, and classy-solid, and in the process I've removed
lit-dom-expressions
from@lume/element
(because the idea is anyone usinghtml
should import it fromsolid-js/html
.However, removing this explicit dependency on
lit-dom-expressions
causes the type error.Hoping I can provide a simple reproduction later.
Expected behavior
solid-js should include dependencies that it depends on. It is missing
lit-dom-expressions
fromdependencies
.Note, I'm still on 1.4, because 1.5 is breaking for lume and I still need to make further refactors to catch up. So, I haven't tested with latest yet, but I see package.json is missing
lit-dom-expressions
independencies
.Screenshots or Videos
n/a
Platform
n/a
Possible Solution
It might be reasonable to add a build step that copies
lit-dom-expression
types into the repo, and havehtml
get the types from there, instead of fromlit-dom-expressions
, like with other parts of solid-js that copy files from other packages to avoid having extra "dependencies".