Kiho / react-form-builder

A complete react form builder that interfaces with a json endpoint to load and save generated forms. The toolbox contains 16 items for gathering data. Everything from star ratings to signature boxes!
MIT License
473 stars 351 forks source link

global can't be used in context of browser #289

Open M-Mubashir674 opened 11 months ago

M-Mubashir674 commented 11 months ago

Encountring following error:

"Uncaught ReferenceError: global is not defined at node_modules/draft-js/node_modules/fbjs/lib/setImmediate.js"

mikeand commented 11 months ago

I worked around this using the suggestion in here: https://stackoverflow.com/questions/65586906/react-and-electron-with-draft-js-global-is-not-defined

I basically added this in the index.html head section:

<script> const global = globalThis; </script>