Skip to content

TypeError: Super expression must either be null or a function, not undefined #151

Closed
@tejasbubane

Description

@tejasbubane

I am getting this error after upgrading to webpack v4. Strangely this happens only in the prod build and not in dev build.

This is the stack-trace in browser console:

TypeError: Super expression must either be null or a function, not undefined
bundle-f82b2570e6fa0145fdb8.js:22:54086
n.withStyles/</n</<
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:22:54086
n.withStyles/</n<
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:22:54066
n.withStyles/<
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:22:53698
<anonymous>
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:36:433740
t
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:1:105
<anonymous>
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:84:260717
t
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:1:105
<anonymous>
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:84:263006
t
http://localhost:8000/js/bundle-f82b2570e6fa0145fdb8.js:1:105

I am actually using react-dates which is using this library. From stacktrace, I suspect this is where the error is coming from. Also removing react-dates makes the error to go away.

Here is my entire webpack config: https://gist.github.com/tejasbubane/9ae4d2e099bef97b3b118f99a163294e

Relevant libraries and their versions:

"react": "^15.6.1",
"react-dates": "^15.5.3",
"react-with-styles": "=2.2.0",
"webpack": "^4.12.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-polyfill": "^6.26.0",

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions