[🐛 Bug]: Error Illegal invocation: function called with incorrect
this reference
when using codehike
#919
Labels
bug
Something isn't working
next-on-pages environment related information
Description
Following #912, the root cause for me is I am using the codehike package to display code blocks @dario-piotrowicz.
The error happens whenever I import components from codehike, e.g.
import { Pre } from "codehike/code"
even without actually using them. I took a quick look at the codehike repo and did not found any suspicious side effects it need to perform. Since codehike works withnext build
I assume it'snext-on-pages
specific.When running
pnpm preview
, the illegal invocation error is as followsReproduction
Clone https://github.com/qiushiyan/next-illegal-invocation and run
pnpm preview
and go to the home page, withnext build && next start
this should display a syntax highlighted code block.Pages Deployment Method
None
Pages Deployment ID
No response
Additional Information
No response
Would you like to help?
The text was updated successfully, but these errors were encountered: