react-checkbox-tree
react-checkbox-tree copied to clipboard
index.browser.js:1195 Uncaught TypeError: Super expression must either be null or a function
after build to show error: Uncaught TypeError: Super expression must either be null or a function.
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.
+1
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 = [{
We have updated webpack and dependencies with last versions. It's fixed.
Updating webpack and dependencies seems to work for us as well.
@davebyrnew and @bastiendonjon can you post your webpack and dependency versions?
We are having exactly same problem with a CRA built with react-app-rewired.
Something to do with the uglify version apparently.
downgrading to v1.5.1 resolved my issue
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?
We are also facing the same issue. Anybody found any solution.
We are also facing the same issue. Anybody found any solution. Try out this package https://www.npmjs.com/package/react-checkbox-tree-enhanced
Hi @vineetsagar Thank you. Using this library it's working fine.
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
For us we switched to the other library specified by @vineetsagar and it worked without updating webpack.
downgrading to v1.5.1 resolved my issue
This worked for me. If you are using Typescript, change value and label types to any
Does not appear to be an issue with newer versions (tested with create-react-app v5.0.1).
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