question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Super expression must either be null or a function

See original GitHub issue

I recently have this error without changing anything in my code.

Error

> Build error occurred TypeError: Super expression must either be null or a function at _inherits (.../node_modules/@babel/runtime/helpers/inherits.js:5:11) at .../node_modules/@streetscape.gl/core/dist/es5/components/log-viewer/perspective-popup.js:102:29 at Object.<anonymous> (.../node_modules/@streetscape.gl/core/dist/es5/components/log-viewer/perspective-popup.js:204:2) at Module._compile (internal/modules/cjs/loader.js:1256:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10) at Module.load (internal/modules/cjs/loader.js:1105:32) at Function.Module._load (internal/modules/cjs/loader.js:967:14) at Module.require (internal/modules/cjs/loader.js:1145:19) at require (internal/modules/cjs/helpers.js:75:18) at Object.<anonymous> (.../node_modules/@streetscape.gl/core/dist/es5/components/log-viewer/object-labels-overlay.js:30:48) { type: 'TypeError' }

Environment

  • streetscape.gl v1.0.6
  • nextJS v9.5.3
  • node v14.7.0
  • npm v6.14.7

Steps to Reproduce

  • npm run build The error happened only during build in production.

It seems related to babel parsing node_modules. I tried differents webpack configs, like keep_fnames: true on the minimizer plugin Terser or UglifyJS like this issue https://github.com/facebook/create-react-app/issues/7236 but none worked.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Pessimistresscommented, Feb 3, 2021

This is caused by react-map-gl switching to functional components. You can work around this with the following in package.json:

"resolutions": {
  "react-map-gl": "5.2.12"
}
3reactions
twojtaszcommented, Feb 5, 2021

I need to publish a new release, then it should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Super expression must either be null or ...
ecmascript 6 - ReactJS giving error Uncaught TypeError: Super expression must either be null or a function, not undefined - Stack Overflow. Stack...
Read more >
React Errors : Super expression must either be null or a function
Have you come across this error when working with React? Uncaught TypeError: Super expression must either be null or a function, not undefined....
Read more >
React Errors : Super expression must either be null or a function
Firstly, if you're certain that you're extending from the correctly named class, e.g. React.Component, not React.component or React.
Read more >
Uncaught TypeError: Super expression must either be null or ...
After making production build i am getting this error in console and application is not getting loaded. My Environment: OS: Linux/Ubuntu ...
Read more >
TypeError: Super expression must either be null or a function ...
Description. TypeError: Super expression must either be null or a function _inherits inherits.js:5:10 <unknown> index.bundle?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found