-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
No longer works in browser with Webpack 5 #52
Comments
Is there a way to add the polyfill? This issue may be related and might get fixed in |
Not sure, I haven't had the time to look into it much. Here's an answer on Stack Overflow: https://stackoverflow.com/a/65018686/955014 A simpler solution could be to just wrap the assignments of Though as I see it, I'm not sure querying process.platform and then hardcoding the behavior based on that is the best solution. For example, the reason I'm using Or, perhaps web and ANSI-colored text streams from external devices is not something you wish to support, which is fine too, and then I suppose you can leave it as is :) |
Edit: The issue is fixed @eddie-dunn @doowb Are you guys able to fix it because i am still getting this recently i upgrade my webpack v4 to v5 and node version 16 to 20 after that i started getting this issue. |
Webpack 5 no longer provides polyfills for NodeJS packages. In my case I get
Uncaught ReferenceError: process is not defined
from this line. I.e., it'sprocess.platform
that fails.I'm running an app built with Create React App, which is why I think the previous line referencing
process.env
seems to work.The text was updated successfully, but these errors were encountered: