My dev server is working fine, but after attempting to build, I am left with several errors that appear to be a mistake
Error 1
src/components/Nav/NavMain.tsx:31:11 - error ts(2322): Type '{ class: string; dangerouslySetInnerHTML: { __html: string; }; }' is not assignable to type 'HTMLAttributes'.
Property 'dangerouslySetInnerHTML' does not exist on type 'HTMLAttributes'.
31 dangerouslySetInnerHTML={{ __html: LogoIcon }}
The source:
<div
class="w-8 h-8 flex justify-center items-center px-1"
dangerouslySetInnerHTML={{ __html: LogoIcon }}
/>
Error 2
src/components/Headless/Nav/NavTOCButton.tsx:27:7 - error ts(2322): Type '{ children: any[]; onClick: () => void; "aria-label": string; class: string; }' is not assignable to type 'ButtonHTMLAttributes'.
Property 'onClick' does not exist on type 'ButtonHTMLAttributes'. Did you mean 'onclick'?
27 onClick={toggleMenu}
This is the correct syntax for a react button, but the build stage is failing.
Here is part of my config:
import preact from "@astrojs/preact";
// https://astro.build/config
export default defineConfig({
site: process.env.NODE_ENV === "development" ? "http://localhost:4321" : "https://techsquidtv.com",
integrations: [tailwind(), sitemap(), preact(), embeds(), expressiveCode(), mdx(), sentry(), spotlightjs()],