codehike: Error occur when build with next-mdx-remote and next.js standalone option
Context
Hi!! Thank you for building and maintaining such a great package. I am encountering some issues when using codehike + next-mdx-remote + Nextjs with the standalone option.
During development, the code goes smoothly. But after building it with the Next.js standalone option, the app can’t find some file that codehike relied on and throw Internal Error.
error running remarkCodeHike [Error: ENOENT: no such file or directory, open '/app/node_modules/.pnpm/shiki@0.10.1/node_modules/shiki/languages/abap.tmLanguage.json'] {
code-hike-test-2 | errno: -2,
code-hike-test-2 | code: 'ENOENT',
code-hike-test-2 | syscall: 'open',
code-hike-test-2 | path: '/app/node_modules/.pnpm/shiki@0.10.1/node_modules/shiki/languages/abap.tmLanguage.json'
code-hike-test-2 | }
The way to reproduce
- Please clone this repo https://github.com/EiffelFly/code-hike-remote-docker
- install everything and use the script
npm run build - Activate the standalone server with
node ./.next/standalone/server.js - goto http://localhost:3000
I have set up a docker image if this could help.
npm run docker:app:develop- goto http://localhost:3000
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 21 (8 by maintainers)
should be fixed with
v0.8.0, let me know how it goes