nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 624 forks source link

Syntax highlighting does not work when using `pnpm` #2511

Closed JMaylor closed 8 months ago

JMaylor commented 8 months ago

Environment


Reproduction

  1. Create a new project npx nuxi@latest init content-app -t content - uses @nuxt/content v2.10.0
  2. Add any code block to index.md file
  3. Add highlight theme to nuxt.config.ts e.g. content: { highlight: { theme: 'light-plus' }}
  4. Install packages with npm install
  5. Start dev server and open http://localhost:3000. Code syntax highlighting should work fine.
  6. Remove node_modules/ and pacakge-lock.json.
  7. Install packages with pnpm install.
  8. Start dev server and open http://localhost:3000. Code is not highlighted.

Describe the bug

When installing @nuxt/content with pnpm, code syntax highlighting does not work.

Additional context

This is probably an upstream issue, but I'm not sure with which package.

Logs

No response

JMaylor commented 8 months ago

Closing as I think that this is actually an issue with nuxt/content > 2.8.0. I'll make a separate issue after more investigation.

jairoblatt commented 8 months ago

@JMaylor I had the same issue, Have you discovered anything that fixes this?

whcxxb commented 8 months ago

Same problem with syntax highlighting issue and nuxt/img module not working either, same project works fine on macOS.