Skip to content

R code highlighting error #1432

@jsandblom

Description

@jsandblom

Environment

Nuxt CLI v3.0.0-rc.6
RootDir: /workspaces/js-n3
Nuxt project info:


  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.6
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: modules, content
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

Reproduction

Try the following on https://content.nuxtjs.org/playground

const a = 'javascript works great'
r <- 'R does not'

Describe the bug

R code is not highlighted. I could not find any console messages in the playground, but on github codespaces I get lots of

[nuxt] [request error] No grammar provided for <source.r>
at Registry.e._collectDependenciesForDep (./node_modules/shiki-es/dist/shiki.mjs:12:24999)
at Registry. (./node_modules/shiki-es/dist/shiki.mjs:12:25495)
at ./node_modules/shiki-es/dist/shiki.mjs:12:23016
at Object.next (./node_modules/shiki-es/dist/shiki.mjs:12:23125)
at s (./node_modules/shiki-es/dist/shiki.mjs:12:21828)
[nuxt] [request error] 500 Internal Server Error (/api/_content/highlight)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async highlightBlock (./.nuxt/dev/index.mjs:2633:17)
at async Promise.all (index 0)
at async Object.transform (./.nuxt/dev/index.mjs:2602:5)
at async parseContent (./.nuxt/dev/index.mjs:2666:18)
at async getContent (./.nuxt/dev/index.mjs:2745:18)
at async Promise.all (index 0)
at async getContentsList (./.nuxt/dev/index.mjs:2715:20)
at async ./.nuxt/dev/index.mjs:541:18
at async ./.nuxt/dev/index.mjs:2830:20

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions