Cuvii

Results 8 comments of Cuvii

Node version matters. Works fine with node v14, but in some case with v16, the problem occurs.

same with MDX-Bundler. ``` RequestId: eeabce19-9e2c-4811-a253-f8e2bb47d004 Error: Runtime exited with error: exit status 1 Runtime.ExitError 2022-10-02T15:50:03.592Z ceffc43d-627d-4def-b9ef-37d29e9be86d ERROR error running remarkCodeHike [Error: ENOENT: no such file or directory, open '/var/task/node_modules/.pnpm/[email protected]/node_modules/shiki/languages/abap.tmLanguage.json']...

Ok, that's a problem with shiki and next.js. Shiki import languages and themes by fs, when run `next build`, both languages and themes are tree-shaken by next.js (not if you...

> Ok, that's a problem with shiki and next.js. > > Shiki import languages and themes by fs, when run `next build`, both languages and themes are tree-shaken by next.js...

Above solution not works for mdx-bundler. Basically same error with https://github.com/kentcdodds/mdx-bundler/issues/158

> kentcdodds/mdx-bundler#158 ``` ✘ [ERROR] Could not resolve "@code-hike/mdx/dist/components.cjs.js" _mdx_bundler_entry_point-228ef4a4-2912-45e8-b923-adb366b11779.mdx:3:109: 3 │ ...eSlot, Scrollycoding} from "@code-hike/mdx/dist/components.cjs.js"; ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "@code-hike/mdx/dist/components.cjs.js" as external to exclude it from...

> you are using mdx-bundler inside `getServerSideProps`? why not `getStaticProps`? Yeah, all pages are rendered inside `getStaticProps`, but not all of them are rendered at build stage. https://nextjs.org/docs/api-reference/data-fetching/get-static-paths

> What would you expect for the fix? I am not sure if there is anything we could do. Well, I am not sure about this too, but I think...