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
I am working on RFUI which is a component library intended to be available to React and Preact projects. Right now I'm using Preact, but eventually I want to figure out how to get it working for React as well.
Anyway, right now I want to publish to NPM. I followed the instructions in the "Setup" section, but I get a bunch of type errors. I've got thisbuild-npm.ts script. When I run it, I get the following output (full output: output.txt):
code/rfui [master●] » deno run -A scripts/build-npm.ts 0.0.12
[dnt] Transforming...
[dnt] Running npm install...
added 3 packages, and audited 4 packages in 293ms
found 0 vulnerabilities
[dnt] Building project...
[dnt] Type checking ESM...
src/components/atoms/badge.tsx:1:37 - error TS2307: Cannot find module 'preact' or its corresponding type declarations.
1 import { ComponentChild, JSX } from "preact";
~~~~~~~~
src/components/atoms/badge.tsx:8:29 - error TS2304: Cannot find name 'HTMLDivElement'.
8 } & Omit<JSX.HTMLAttributes<HTMLDivElement>, "size">;
~~~~~~~~~~~~~~
src/components/atoms/badge.tsx:8:29 - error TS4081: Exported type alias 'BadgeType' has or is using private name 'HTMLDivElement'.
8 } & Omit<JSX.HTMLAttributes<HTMLDivElement>, "size">;
~~~~~~~~~~~~~~
src/components/atoms/badge.tsx:72:5 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
72 <div
~~~~
73 {...restWithoutClass}
~~~~~~~~~~~~~~~~~~~~~~~~~~~
74 class={className}
~~~~~~~~~~~~~~~~~~~~~~~
75 >
~~~~~
src/components/atoms/badge.tsx:72:6 - error TS2304: Cannot find name 'React'.
72 <div
~~~
src/components/atoms/badge.tsx:77:5 - error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
I don't understand why this is. I am inside of a Fresh project. In that project, everything works fine. No type errors.
I'm also not clear on whether this matters or not. I see that you can ignore these type errors (amongst other stuff) if you want, but I don't understand what the implications are of doing so, and whether or not doing so would be wise.
The text was updated successfully, but these errors were encountered:
I am working on RFUI which is a component library intended to be available to React and Preact projects. Right now I'm using Preact, but eventually I want to figure out how to get it working for React as well.
Anyway, right now I want to publish to NPM. I followed the instructions in the "Setup" section, but I get a bunch of type errors. I've got this
build-npm.ts
script. When I run it, I get the following output (full output: output.txt):I don't understand why this is. I am inside of a Fresh project. In that project, everything works fine. No type errors.
I'm also not clear on whether this matters or not. I see that you can ignore these type errors (amongst other stuff) if you want, but I don't understand what the implications are of doing so, and whether or not doing so would be wise.
The text was updated successfully, but these errors were encountered: