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
Uncaught TypeError: Super expression must either be null or a function, not undefined #7236
Comments
|
Thanks for updating this issue @menkermatias. It looks like the library author is minifying their code, which I think contributes to the issue (really, this shouldn't be needed as the client's Webpack config does it). I'm not sure what to do here, but perhaps we can close the issue and leave it here as a reference for future? |
|
@mrmckeb Thanks! I think it will be nice to have this reference, by the way, do you think it's necessary can create a PR to prevent the compressor from discarding function names? |
|
@menkermatias, I think that this shouldn't be necessary... if Terser is working correctly. I think we first need to understand where it's happening, and then look to fix the root cause. |
|
any further updates on this? |
+1 |
|
I solved this problem putting keep_fnames: true on the minimizer plugin TerserPlugin options, @jilliankeenan @roadev did you try it? |
|
I changed the plugin, It was almost one year ago haha |
|
@matiasmenker Having this exact problem. However I just learned that in order to change the webpack config, you have to eject? Or is there a way around that? |
|
@Ploppz You can do a config override using react-app-rewired I added the following code to a file called |
|
Thansk @jilliankeenan . Did you mean |
ah yes keep_fnames: true - apologies copy pasta mistake. Possibly check your react-app-rewired is definitely working as that will be required for this override to work. I resolved this issue a while ago so I'm not sure if I can be of much further help. :) |
|
Hm, it appears in my case like Edit: Fixed my problem; was in react-checkbox-tree: jakezatecky/react-checkbox-tree#210 |
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Yes i do
Environment
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 8.11.3 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 5.7.1 - /usr/local/bin/npm
Browsers:
Chrome: 74.0.3729.169
Firefox: 64.0.2
Safari: 12.1.1
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.1 => 3.0.1
npmGlobalPackages:
create-react-app: Not Found
Steps to Reproduce
Expected Behavior
Server the build with a normal behave ( normal means the same that i have on a development build )
Actual Behavior
Yes, the app give a this error:
Uncaught TypeError: Super expression must either be null or a function, not undefined
Here inside the error:

Reproducible Demo
COMMENT:
I solved this problem putting keep_fnames: true on the minimizer plugin TerserPlugin options.
If you pass true to keep_fnames you prevent the compressor from discarding function names. Useful for code relying on Function.prototype.name
The text was updated successfully, but these errors were encountered: