Comments (6)
Why is it non-deterministic? Does it happen randomly for the same code highlighted? Can you get a minimal repro?
from shiki.
I get a similar error during next dev
. As @maccman mentioned, it happens sporadically. I've never been able to reproduce it consistently. That's why I didn't open an issue.
I can only get rid of the error by restarting the dev server until it happens again after minutes or hours.
Here's the code. I'm sorry it's not a minimal repro. Just putting here in case it's helpful: https://github.com/ariakit/ariakit/blob/d257a3edb431ac1f36cda9ca76c1ea160ff4481d/website/components/code-block.tsx#L56-L58
from shiki.
Getting the same error in my Next.js app using the new app router functionality. Using [email protected]
Looks the same as #417 and #433
Following this comment from @orta didn't help, tried old versions and different themes (nord, dracula, dracula-soft).
I can only get rid of the error by restarting the dev server until it happens again after minutes or hours.
To get rid of my build error I had to delete one of my blog post so it wouldn't be included. But for local I do the same thing with the dev server
from shiki.
Hey @tannerabread, does it happen with consistently with that blog post? Can you post a minimal repro?
from shiki.
@octref it was consistent enough that I couldn't build my app, locally or on Vercel
It was inconsistent with most posts I was adding to my project but seemed really consistent with this markdown file. Sometimes the project would build if I removed that file and sometimes not
I was finally able to get around it by switching to MDX vs .md files and using shiki in conjunction with rehype-pretty-code and a completely different architecture as outlined here
A big key in the solution seemed to be including the plugins with .next.config.mjs
as shown in the new docs for Next.js app router
from shiki.
We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.
from shiki.
Related Issues (20)
- Return the grammar state after tokenizing HOT 3
- shiki/wasm dependency not found HOT 1
- Decorations API throws TypeError when decorating last index
- Doc: `@shikijs/markdown-it` and transformers usage
- Unable to use Color Replacements option in the `Rehype` plugin
- Support for Lit HOT 5
- Decorations API silently fails when `start.line > end.line`
- Code transformers do not work correctly with `rose-pine` theme
- creating a shiki wrapper for nextjs, and rsc HOT 9
- Module not found: Error: Can't resolve 'shiki/wasm' in 'D:\test\node_modules\shiki\dist\chunks' HOT 1
- `@shikijs/transformers` not working with Astro HOT 1
- Make grammar state working with `themes` instead of just `theme` HOT 6
- Cypress test failed with Shiki HOT 1
- Option to exclude themeMatches from explanations HOT 1
- Transformer bug with SQL HOT 4
- common transformers: line markers HOT 1
- Allow overriding/optionalizing background color HOT 2
- Twoslash: `meta` is passed to the popup types codeblock
- `New grammar`: org support HOT 1
- [BUG] @shikijs/monaco bundle size HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiki.