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

@astrojs/prism + pnpm doesn't work together #6402

Closed
1 task done
raulfdm opened this issue Mar 2, 2023 · 0 comments · Fixed by #6485
Closed
1 task done

@astrojs/prism + pnpm doesn't work together #6402

raulfdm opened this issue Mar 2, 2023 · 0 comments · Fixed by #6485
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@raulfdm
Copy link
Contributor

raulfdm commented Mar 2, 2023

What version of astro are you using?

2.0.16

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm and pnpm

What operating system are you using?

Mac

Describe the Bug

First, I don't think it's an Astro's direct problem, but I'd like to bring it here so we can narrow better where it should go.

In a nutshell, I was trying to set up @astrojs/prism on my blog that uses pnpm workspaces.

I followed the instructions about how to add it (which are very straightforward) but suddenly, I got an error:

const components = require('../components.js');
^
const getLoader = require('../dependencies');

In trying to identify the problem, I have created 3 projects:

  1. astro with pnpm
  2. astro with npm
  3. vite vanilla

On both astro's projects, I've set up @astrojs/prism, while in the vite vanilla JS (using pnpm) I've installed manually prismjs and rendered the HTML there.

Both Astro with npm and vite projects worked fine with prism, while Astro with pnpm throws the same error.

Repo repository

https://github.com/raulfdm/astro-prism-pnpm-bug

Link to Minimal Reproducible Example

https://stackblitz.com/github/raulfdm/astro-prism-pnpm-bug?file=README.md

Participation

  • I am willing to submit a pull request for this issue.
@bluwy bluwy added the - P3: minor bug An edge case that only affects very specific usage (priority) label Mar 9, 2023
@bluwy bluwy self-assigned this Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants