You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: ReferenceError: global is not defined in react-form-builder2.js
Description:
I'm experiencing an issue with the react-form-builder2 library. When running my application, I encounter the following error:
Uncaught ReferenceError: global is not defined
Expected Behavior: The library should initialize without errors, allowing me to use the form builder in my application.
Actual Behavior: I receive the error Uncaught ReferenceError: global is not defined in the console, preventing the application from functioning correctly.
You encountered this error because this library relies on the global variable, which is available in Node.js environments but not in the browser. Vite, by default, doesn't provide polyfills for Node.js globals like global.
The solution mentioned in vitejs/vite#5912 is a temporary fix and wrong. Defining "global" in the config is not a good idea, as it may break your application when building it in a Linux environment.
I am also looking for an optimal solution and will let you know if I find one.
Title: ReferenceError: global is not defined in react-form-builder2.js
Description:
I'm experiencing an issue with the react-form-builder2 library. When running my application, I encounter the following error:
Uncaught ReferenceError: global is not defined
Expected Behavior: The library should initialize without errors, allowing me to use the form builder in my application.
Actual Behavior: I receive the error Uncaught ReferenceError: global is not defined in the console, preventing the application from functioning correctly.
Environment:
Library version: "^0.19.0"
Node version: "v20.15.1"
React version: "^18.3.1"
Browser: Chrome
Screenshots
The text was updated successfully, but these errors were encountered: