Skip to content
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

ReactJS app not responsive when using randomstring.generate() #37

Closed
bingchuan93 opened this issue Sep 22, 2022 · 2 comments
Closed

ReactJS app not responsive when using randomstring.generate() #37

bingchuan93 opened this issue Sep 22, 2022 · 2 comments

Comments

@bingchuan93
Copy link

bingchuan93 commented Sep 22, 2022

Hihi!

I am using your package in my ReactJS project and I realised when randomstring.generate() is called, somehow the site just hangs and becomes unresponsive. Importing the package had no issues, only when running it. Any idea why?

It can be replicated by creating a new react app, installing randomstring dependency and calling randomstring.generate() anywhere.

@JohnDDuncanIII
Copy link

I ran into the same issue after upgrading from webpack 4 to 5.

Screen Shot 2022-10-11 at 2 51 48 PM

I fixed it by adding

new webpack.ProvidePlugin({
    Buffer: ["buffer", "Buffer"],
})

to our webpack.config.js

See

@eliaskg
Copy link
Contributor

eliaskg commented Oct 20, 2022

Thanks guys. Fixed via #38

@eliaskg eliaskg closed this as completed Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants