Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shiki language lazy loading not working with twoslash #4334

Closed
4 tasks done
kravetsone opened this issue Nov 2, 2024 · 3 comments
Closed
4 tasks done

shiki language lazy loading not working with twoslash #4334

kravetsone opened this issue Nov 2, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@kravetsone
Copy link

kravetsone commented Nov 2, 2024

Describe the bug

I wants to build my documentation with bunx vitepress build docs (running in node) but it fails with [vitepress] Language js not found, you may need to load it first

Solved by downgrading to 1.4.2

Repository

CICD logs

Reproduction

gramiojs/documentation@561ce31

Expected behavior

Should work

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 7 7700 8-Core Processor
    Memory: 1.36 GB / 31.15 GB
  Binaries:
    Node: 22.10.0 - ~\AppData\Local\fnm_multishells\639520_1730573241452\node.EXE
    npm: 10.9.0 - ~\AppData\Local\fnm_multishells\639520_1730573241452\npm.CMD
    bun: 1.1.34 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (130.0.2849.46)
  npmPackages:
    vitepress: ^1.4.3 => 1.4.3

Additional context

No response

Validations

@kravetsone kravetsone added the bug: pending triage Maybe a bug, waiting for confirmation label Nov 2, 2024
kravetsone added a commit to gramiojs/documentation that referenced this issue Nov 2, 2024
@brc-dd brc-dd added bug Something isn't working and removed bug: pending triage Maybe a bug, waiting for confirmation labels Nov 3, 2024
@brc-dd
Copy link
Member

brc-dd commented Nov 3, 2024

Hmm, twoslash is causing issues with lazy loading, but even if I disable it, curl and tree are causing issues. I don't see any language file for those. Weird.

Edit: Ah, curl and tree aren't even there in shiki, resolveLang should've return a falsy value for those. -- fixed this in dcb8450

@brc-dd brc-dd self-assigned this Nov 3, 2024
@brc-dd
Copy link
Member

brc-dd commented Nov 3, 2024

Pushed a temporary patch in v1.4.4. Keeping the issue open though.

@brc-dd brc-dd changed the title [vitepress] Language js not found, you may need to load it first shiki language lazy loading not working with twoslash Nov 3, 2024
@brc-dd brc-dd closed this as completed in fc92a77 Nov 3, 2024
@brc-dd
Copy link
Member

brc-dd commented Nov 3, 2024

Should work fine with 1.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants