Arnaldur
Arnaldur
SSolidJS
Created by Arnaldur on 5/12/2024 in #support
Comp is not a function when using remarkMath
I have been migrating a static site from solid-start 0.3 and it's mostly working. It has a remarkFrontmatter plugin that I use to grab the frontmatter of posts. To get the post data I use import.meta.glob from vite and all is working again. When putting math into a mdx file, I get the error Comp is not a function. These are the packages I'm using
"devDependencies": {
"typescript": "^5.4.5",
"vite": "^5.2.11"
},
"dependencies": {
"@mdx-js/mdx": "^3.0.1",
"@solidjs/meta": "^0.29.3",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "1.0.0-rc.1",
"@vinxi/plugin-mdx": "^3.7.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-katex": "^7.0.0",
"rehype-mdx-import-media": "^1.2.0",
"rehype-slug": "^6.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"remark-mdx-frontmatter": "^4.0.0",
"solid-js": "^1.8.17",
"solid-mdx": "^0.0.7",
"undici": "^6.16.1",
"vinxi": "^0.3.11"
},
"devDependencies": {
"typescript": "^5.4.5",
"vite": "^5.2.11"
},
"dependencies": {
"@mdx-js/mdx": "^3.0.1",
"@solidjs/meta": "^0.29.3",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "1.0.0-rc.1",
"@vinxi/plugin-mdx": "^3.7.1",
"rehype-autolink-headings": "^7.1.0",
"rehype-katex": "^7.0.0",
"rehype-mdx-import-media": "^1.2.0",
"rehype-slug": "^6.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"remark-mdx-frontmatter": "^4.0.0",
"solid-js": "^1.8.17",
"solid-mdx": "^0.0.7",
"undici": "^6.16.1",
"vinxi": "^0.3.11"
},
Note that @vinxi/plugin-mdx reports this peer dependency issue.
└─┬ @vinxi/plugin-mdx 3.7.1
└── ✕ unmet peer @mdx-js/mdx@<3: found 3.0.1
└─┬ @vinxi/plugin-mdx 3.7.1
└── ✕ unmet peer @mdx-js/mdx@<3: found 3.0.1
But the older version works worse than the new version. Doesn't even work without any math. This migration has been a little hard but that's no biggie. I've faced and resolved many issues performing it but I have no idea where to start on this one. Thank you for all your support <3
11 replies