-
Notifications
You must be signed in to change notification settings - Fork 815
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
[react-popper] Uncaught ReferenceError: process is not defined #1579
Comments
I did run into this issue as well, unfortunately. My short term solution was to define process ahead of the loading of my compiled application JS:
Additionally, you could define Longer term solution might be to (a) notify the developer or (b) create a new patch release of |
Ok, well I'm feeling a little more vindicated in my struggles with this particular problem as I came to the same conclusion. I think there is one more solution and that is to create a webpack config in the cljsjs package that builds react-popper from source without the I wonder if a) is the right solution with c) being the temporary stop-gap. I am slightly concerned that as ReactPopper has moved onto 1.x releases, change requests to 0.x may not be a priority. That said, the maintainer is very responsive to GH issues |
@EmergentBehavior Out of interest, do you know if it is possible to dynamically define The use case here is about: working around this issue and having the PropType warnings behave correctly in both |
I agree. Might be worth doing this and then opening an issue with https://github.com/FezVrasta/react-popper to nudge them to fix it.
For our application, we dynamically generate the You could also try selectively running (if prod build) something like There might be a more efficient way but I can't think of it off top of my head. |
Thanks @EmergentBehavior, I appreciate your input and especially the quick response. I'm planning to raise a webpack build PR on |
@nijk I'm also getting an intermittent error around |
I think because they call (in unminifed file) |
Sorry for the delay on this, I've gone down a bit of a rabbit hole with this issue in ReactPopper which has resulted in finding an upstream issue in the
|
When attempting to use react-popper with Closure Compiler's
:optimizations :advanced
I get a javascript error that process is not defined. I believe this is because ReactPopper uses thetransform-react-remove-prop-types
babel plugin which wraps the PropTypes in a conditional referencingprocess.env.NODE_ENV
to allow for Dead Code Elimination (DCE). This doesn't seem to be appropriate for a production build as the Dead Code is not actually eliminated from the minified asset and it relies on a global which is not normally available in production React environments.This may be an issue for the ReactPopper dependency to resolve, but I wanted to highlight it for others here and get an understanding of the options for resolving this.
@EmergentBehavior I noticed that you recently updated the
react-popper
package, did you experience this issue locally? Any tips or suggestions would be greatly appreciatedThe text was updated successfully, but these errors were encountered: