-
Notifications
You must be signed in to change notification settings - Fork 47
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
ReferenceError: require is not defined #239
Comments
Hi, I have encountered the same issue as well. My approach to resolving it was to first downgrade the version. |
|
Thanks for the report! |
I'm closing this because it seems to have been resolved. Please reopen if it isn't. |
Thank you |
Describe the bug
Hi
I am getting this error when using the version 3.7.0
ReferenceError: require is not defined
at ./node_modules/unleash-proxy-client/build/main.esm.js (main.esm.js:1:4855)
I cant repro with 3.6.1
In the latest version of unleash-proxy-client, we encountered a "require is not defined" error when bundling with Webpack 5 in a browser environment. This seems to be caused by CommonJS require statements in the distributed ESM build (main.esm.js), which is unexpected in an ES module. Webpack 5 does not provide automatic polyfills for Node.js built-ins, which may be causing this issue. Prior versions of unleash-proxy-client did not exhibit this behavior, and similar imports worked correctly in our setup. Could you confirm if this change was intentional, and if so, recommend the best way to use this package in a Webpack 5 project without modifying polyfill settings?
Steps to reproduce the bug
No response
Expected behavior
No response
Logs, error output, etc.
No response
Screenshots
No response
Additional context
No response
Unleash version
No response
Subscription type
None
Hosting type
None
SDK information (language and version)
No response
The text was updated successfully, but these errors were encountered: