Arnaldur
Comp is not a function when using remarkMath
This was my previous
app.config.ts
config.
Here are the fields I changed, before changing them:
This is what they look like now:
I tried many permutations of using "solid-jsx"
as different import sources and such, and I did remove the jsx: true
property. But I apparently never did all at once so I didn't stumble upon this solution before 10 hours of debugging later.11 replies
Comp is not a function when using remarkMath
The problem to me looks very much like those components should be able to be strings. They are sent directly into the
createComponent
function as Comp
and it assumes that Comp
is a function. That obviously doesn't work but I'm curious how it did. I used these same packages some time ago with the old solid-start and that worked fine.11 replies
Comp is not a function when using remarkMath
Previously, I used
solid-jsx
as it seemed better maintained and more featureful. That package doesn't work for the same reason as the math elements don't work. That is, solid-jsx doesn't generate those JSX elements at all and that's why it doesn't work.11 replies
Comp is not a function when using remarkMath
I have gathered that
solid-mdx
just creates a bunch of JSX components, one for every HTML element. The reason it fails with katex is that it uses mathML HTML elements and those aren't considered in solid-mdx
.11 replies
Comp is not a function when using remarkMath
I seem to have fixed something so now
mdx-js/[email protected]
works. I was using mdx-js/[email protected]
. vinxi-mdx complained about incompatiblilty with version 3 but I couldn't get 2 to work. Now 2 works but the issue with rehype-katex
is unchanged.11 replies
Comp is not a function when using remarkMath
From this simple markdown file
and when this stuff is being rendered by
solid-js
, it calls this function https://github.com/solidjs/solid/blob/a72d393a07b22f9b7496e5eb93712188ccce0d28/packages/solid/src/server/rendering.ts#L79
because the JSX is expanded into this:
so it's treating the basic html tags as JSX components and trying to render them. But they are just strings, causing the error.11 replies
Comp is not a function when using remarkMath
https://github.com/arnfaldur/arnaldur-be/tree/develop
This is the repo and branch that the issue occurs on.
And if you run the code, this page has a math expression, triggering the error.
http://localhost:3000/writing/about/solving-robozzle-pt1
11 replies