You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://github.com/devnjw/fumadocs
cd fumadocs
pnpm install
pnpm build
Current vs. Expected behavior
With pnpm build I got following error:
...
SyntaxError: Bad control character in string literal in JSON at position 1143
at JSON.parse (<anonymous>)
at 66214 (/Users/jinwoo/gits/test/fd-test/.next/server/chunks/6214.js:1:138)
at Function.t (/Users/jinwoo/gits/test/fd-test/.next/server/webpack-runtime.js:1:143) {
digest: '3675251263'
}
SyntaxError: Bad control character in string literal in JSON at position 1143
at JSON.parse (<anonymous>)
at 66214 (/Users/jinwoo/gits/test/fd-test/.next/server/chunks/6214.js:1:138)
at Function.t (/Users/jinwoo/gits/test/fd-test/.next/server/webpack-runtime.js:1:143) {
digest: '3675251263'
}
Error occurred prerendering page "/docs/buy-museum-tickets". Read more: https://nextjs.org/docs/messages/prerender-error
SyntaxError: Bad control character in string literal in JSON at position 1143
at JSON.parse (<anonymous>)
at 66214 (/Users/jinwoo/gits/test/fd-test/.next/server/chunks/6214.js:1:138)
at Function.t (/Users/jinwoo/gits/test/fd-test/.next/server/webpack-runtime.js:1:143)
✓ Generating static pages (8/8)
> Export encountered errors on following paths:
/docs/[[...slug]]/page: /docs/buy-museum-tickets
ELIFECYCLE Command failed with exit code 1.
I expected build successfully.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000
Available memory (MB): 32768
Available CPU cores: 10
Binaries:
Node: 20.12.2
npm: 10.5.0
Yarn: 1.22.19
pnpm: 9.3.0
Relevant Packages:
next: 14.2.13 // Latest available version is detected (14.2.13).
eslint-config-next: N/A
react: 18.3.1
react-dom: 18.3.1
typescript: 5.6.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Integrations (e.g OpenAPI, Typescript DocsGen)
Additional context
I created project with command pnpm create fumadocs-app.
Then I intergrated OpenAPI following the document. pnpm dev works, but pnpm build fails.
devnjw
changed the title
Build fail - SyntaxError: Bad control character in string literal in JSON at position 1143
APIPage Build fail - SyntaxError: Bad control character in string literal in JSON at position 1143
Sep 24, 2024
Confirmed an upstream issue from Shiki, installing Shiki to your workspace with pnpm i shiki can fix the issue (probably due to some logic of Next.js bundler)
To Reproduce
git clone https://github.com/devnjw/fumadocs cd fumadocs pnpm install pnpm build
Current vs. Expected behavior
With
pnpm build
I got following error:I expected build successfully.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 Available memory (MB): 32768 Available CPU cores: 10 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: 1.22.19 pnpm: 9.3.0 Relevant Packages: next: 14.2.13 // Latest available version is detected (14.2.13). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: 5.6.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Integrations (e.g OpenAPI, Typescript DocsGen)
Additional context
I created project with command
pnpm create fumadocs-app
.Then I intergrated OpenAPI following the document.
pnpm dev
works, butpnpm build
fails.I've used museum.yaml example for reproduction
The text was updated successfully, but these errors were encountered: