-
Notifications
You must be signed in to change notification settings - Fork 27k
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
highlight.js cannot be found when using Yarn v3.1 PnP with next.js 12 #30393
Comments
To work around this error use |
Thankyou @jecassis - it's not ideal, but it has my code working with Next.js 12, so thank you for the suggestion :) |
Getting the same issue on Next.js 12.0.2 and Yarn 3.1 with Zero Installs. @jecassis workaround isn't working for me either and throws
FWIW, https://github.com/remarkjs/remark-unwrap-images is ESM only |
Having the same issue as @bencmbrook with |
Closing as duplicate of #30363 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
12.0.0
What version of Node.js are you using?
16.13.0
What browser are you using?
Safari 15.1
What operating system are you using?
MacOS Monterey
How are you deploying your application?
Vercel
Describe the Bug
Using highlight.js, Next.js 12.0.0, Yarn v3.1.0 with strict PnP, the following error occurs upon page load:
The same code works using Next.js 11.x
Expected Behavior
The import should work correctly and the page should load without error.
To Reproduce
CD in to the project folder.
In
./pages/index.tsx
add the imports:Inside the
Home
arrow function, add theuseEffect
hook:Run the dev server:
Visit http://localhost:3000, note error in terminal log.
See https://github.com/mward-sudo/next12-highlightjs-error for a minimal reproduction.
The text was updated successfully, but these errors were encountered: