Closed YuukanOO closed 2 years ago
Hi Julien, thanks for reporting and providing a reproduction! π
Released a fix in @islands/mdx@0.7.6
.
You can run npm update
to bump that package, which should fix the error.
Nice! Thanks for being so fast! π
iles
andvite
.Description π
Tested on a fresh project after a clean init. When activating the
@islands/prism
module in theiles.config.ts
and adding anmdx
file with some code in it, it fails with a[plugin:iles:mdx:compile] Cannot handle unknown node raw
error.Reproduction π
Tested with this repo: https://github.com/YuukanOO/iles-app
Add
@islands/prism
in the modules section on theiles.config.ts
and a sample .mdx file with code in it:Dependencies Info
_Run `npx iles info` and `pnpm list` (or `npm list`) and provide the output:_ ``` iles v0.7.32 vite v2.8.6 ``` ``` iles-app@0.0.0 /Users/julien/Documents/Sources/tmp/iles-app βββ @islands/prism@0.1.1 βββ iles@0.7.32 βββ typescript@4.6.2 βββ vue-tsc@0.29.8 ```Logs π
Output
``` 18:33:13 [vite] Internal server error: Cannot handle unknown node `raw` Plugin: iles:mdx:compile File: /Users/julien/Documents/Sources/tmp/iles-app/src/pages/something.mdx at Object.unknown (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/hast-util-to-estree/index.js:155:9) at Object.one [as handle] (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/zwitch/index.js:52:17) at all (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/hast-util-to-estree/index.js:583:28) at Object.root (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/hast-util-to-estree/index.js:508:20) at Object.one [as handle] (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/zwitch/index.js:52:17) at toEstree (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/hast-util-to-estree/index.js:119:24) at file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/xdm/lib/plugin/rehype-recma.js:15:20 at wrapped (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/trough/index.js:115:27) at next (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/trough/index.js:65:23) at done (file:///Users/julien/Documents/Sources/tmp/iles-app/node_modules/trough/index.js:148:7) ```Screenshots π·