Skip to content

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

Description

@matiasmenker

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

  1. Create the build for production
  2. Server the build with serve
  3. Enter on the url that serve give for my

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

Screenshot 2019-06-14 at 11 30 56

Here inside the error:
Screenshot 2019-06-14 at 11 37 21

Reproducible Demo

  1. Create a react app with cra
  2. Install this library https://github.com/dexma/ui-components
  3. Make a build to production
  4. Server the build with serve npm package

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions