react-dates: Uncaught TypeError: Super expression must either be null or a function, not undefined
Getting error this in a production environment, while local dev works without issues.
Using react-dates 18.2.0 18.2.1
Uncaught TypeError: Super expression must either be null or a function, not undefined
at withStyles.js:44
at withStyles.js:44
at withStyles.js:158
at Object.<anonymous> (CalendarDay.js:276)
at o (bootstrap:78)
at Object.<anonymous> (index.js:207)
at o (bootstrap:78)
at Object.<anonymous> (index.js:2)
at o (bootstrap:78)
at Object.<anonymous> (sn.hd.product.js:53)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (5 by maintainers)
We’re also experiencing this error in our application code base.
So, I seem to have solved this in our case at least.
In our production webpack task, we are using the uglify-webpackjs-plugin.
Adding the lines:
keep this error from happening in that environment.
Possibly some food for thought on why this issue is happening in the future.
Ultimately, upgrading uglifyjs-webpack-plugin to v2.0.1 from v1.2.7 solved this issue. Found the info I needed starting here: https://github.com/facebook/react/issues/13987#issuecomment-436509006 in case some lone traveler is interested.
It’s excluded from babel.