fuma-nama / fumadocs

The beautiful docs framework for Next.js. Alternative to Nextra
https://fumadocs.vercel.app
MIT License
1.36k stars 78 forks source link

Upgraded to fumadocs 12 -> 13.4; Getting `ShikiError`'s on build #795

Closed ndom91 closed 2 weeks ago

ndom91 commented 2 weeks ago

To Reproduce

With this branch I can no longer build my Fumadocs project.

To reproduce:

  1. Clone repo and install deps
  2. run pnpm build
  3. Error

Webpack initial complains about not being able to serialize the error, and then we see the actual error message:

image

Specifically it's complaining about these files:

These are the only 3 files using ``bash code blocks, so that much makes sense. They're not using any additional highlighting or notation or any feature other than atitle="Terminal"` annotation.

I used your fumadocs docs site as a "template" when upgrading, so the shiki libs I have installed are:

Below are my source and source.config files

app/source.ts ```ts import { meta, docs } from "@/.source" import { createMDXSource } from "fumadocs-mdx" import { loader } from "fumadocs-core/source" import { attachFile, createOpenAPI } from "fumadocs-openapi/server" import type { InferMetaType, InferPageType } from "fumadocs-core/source" export const utils = loader({ source: createMDXSource(docs, meta), pageTree: { attachFile } }) export const openapi = createOpenAPI({}) export type Page = InferPageType export type Meta = InferMetaType ```
source.config.ts ```ts import { defineConfig, defineDocs } from "fumadocs-mdx/config" import remarkYoutube from "remark-youtube" import { remarkHeading, remarkImage, remarkStructure, rehypeCode } from "fumadocs-core/mdx-plugins" export const { docs, meta } = defineDocs({ docs: {} }) export default defineConfig({ lastModifiedTime: "git", mdxOptions: { rehypeCodeOptions: { inline: "tailing-curly-colon", themes: { light: "catppuccin-latte", dark: "catppuccin-mocha" } }, remarkPlugins: [remarkHeading, remarkImage, remarkStructure, remarkYoutube], rehypePlugins: (v) => [rehypeCode, ...v] } }) ```

Current vs. Expected behavior

Expect to build successfully

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1-NixOS SMP PREEMPT_DYNAMIC Sat Aug  3 07:01:09 UTC 2024
  Available memory (MB): 31607
  Available CPU cores: 14
Binaries:
  Node: 22.4.1
  npm: 10.8.1
  Yarn: N/A
  pnpm: 9.3.0
Relevant Packages:
  next: 14.2.7 // Latest available version is detected (14.2.7).
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.2
Next.js Config:
  output: export

Which area(s) are affected? (Select all that apply)

Core

Additional context

No response

fuma-nama commented 2 weeks ago

Fixed on the latest releases, check the closed issue

ndom91 commented 2 weeks ago

Awesome works for me, thanks for the quick turnaround :pray: