react-checkbox-tree icon indicating copy to clipboard operation
react-checkbox-tree copied to clipboard

index.browser.js:1195 Uncaught TypeError: Super expression must either be null or a function

Open beijing-dentsu opened this issue 5 years ago • 15 comments

after build to show error: Uncaught TypeError: Super expression must either be null or a function.

beijing-dentsu avatar May 25 '20 07:05 beijing-dentsu

Hello there.

Can you provide some more context or point to a simple live example that showcases this error? You can modify and fork this sandbox page.

jakezatecky avatar May 27 '20 00:05 jakezatecky

+1

bastiendonjon avatar Jun 01 '20 12:06 bastiendonjon

We are experiencing the same issue. In our windows environments, everything seems to work OK. When deployed to Linux with server running pm2/express, the windows browser gets this error: https://************/static/node_modules/react-checkbox-tree/lib/index.browser.js Unfortunately the server is behind a firewall, so it is not publicly accessible.

Here is the code around the error: var n, r, o; return function (e, t) { if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && x(e, t); }(t, e), n = t, (r = [{

davebyrnew avatar Jun 02 '20 13:06 davebyrnew

We have updated webpack and dependencies with last versions. It's fixed.

bastiendonjon avatar Jun 02 '20 13:06 bastiendonjon

Updating webpack and dependencies seems to work for us as well.

davebyrnew avatar Jun 02 '20 15:06 davebyrnew

@davebyrnew and @bastiendonjon can you post your webpack and dependency versions?

kranthikiran01 avatar Jun 29 '20 17:06 kranthikiran01

We are having exactly same problem with a CRA built with react-app-rewired.

Something to do with the uglify version apparently.

bknill avatar Jun 29 '20 22:06 bknill

downgrading to v1.5.1 resolved my issue

kranthikiran01 avatar Jun 30 '20 18:06 kranthikiran01

Everything works fine in the dev environment. However, in a production environment, I'm getting exception. Based on others answers I tried to update the webpack to the latest version, however, I'm still facing the issue. Any suggestions, what could be the possible reason?

vineetsagar avatar Jul 19 '20 09:07 vineetsagar

We are also facing the same issue. Anybody found any solution.

abhilashdkadv avatar Sep 18 '20 08:09 abhilashdkadv

We are also facing the same issue. Anybody found any solution. Try out this package https://www.npmjs.com/package/react-checkbox-tree-enhanced

vineetsagar avatar Sep 18 '20 08:09 vineetsagar

Hi @vineetsagar Thank you. Using this library it's working fine.

abhilashdkadv avatar Sep 18 '20 09:09 abhilashdkadv

We are also facing the same issue. Anybody found any solution.

Yes, I have updated webpack and webpack-cli

webpack from '4.30.0' -> '4.44.2' webpack-cli from '3.3.0' -> '3.3.12'

After that error disappeared and my application starts working in production

CrazyDuckDuck avatar Sep 22 '20 19:09 CrazyDuckDuck

For us we switched to the other library specified by @vineetsagar and it worked without updating webpack.

abhilashdkadv avatar Sep 23 '20 11:09 abhilashdkadv

downgrading to v1.5.1 resolved my issue

This worked for me. If you are using Typescript, change value and label types to any

muralimulagalapati-zz avatar Oct 15 '20 12:10 muralimulagalapati-zz

Does not appear to be an issue with newer versions (tested with create-react-app v5.0.1).

jakezatecky avatar Nov 04 '22 05:11 jakezatecky

We are also facing the same issue. Anybody found any solution. Try out this package https://www.npmjs.com/package/react-checkbox-tree-enhanced

along with this i also had to add legacy-peer-deps=true in .npmrc as we are currently using react version 18

YogeshPrasanna avatar Nov 22 '22 09:11 YogeshPrasanna