rajinwonderland / react-code-blocks

React code blocks and code snippet components
https://react-code-blocks.rajinwonderland.vercel.app
MIT License
613 stars 81 forks source link

Uncaught ReferenceError: global is not defined #75

Open bithaolee opened 1 year ago

bithaolee commented 1 year ago

core.js:221
Uncaught ReferenceError: global is not defined at capture (core.js:221:28) at node_modules/react-code-blocks/node_modules/refractor/core.js (core.js:5:15) at __require2 (chunk-62VDRKYJ.js?v=20a5b317:19:50) at prism-light.js:2:23

VenoM9078 commented 1 year ago

Were you able able to fix this? I'm also getting this error while trying to use react-code-blocks in my React app.

granteagon commented 1 year ago

Same. Any luck?

imollm commented 1 year ago

Same here

Uncaught ReferenceError: global is not defined
    at capture (core.js:221:28)
    at node_modules/refractor/core.js (core.js:5:15)
    at __require (chunk-DFKQJ226.js?v=8327f63f:8:50)
    at prism-light.js:2:23
felixyeboah commented 1 year ago

any fix for this? i have been stuck on this error for days.

levpachmanov commented 1 year ago

https://github.com/vitejs/vite/discussions/5912#discussioncomment-2908994 worked for me