TypeError on 4.1.0 and 4.1.1 (but not 4.0.2)
On versions 4.1.0 and 4.1.1, I'm seeing the error:
Uncaught TypeError: Super expression must either be null or a function, not undefined
Downgrading to 4.0.2 fixes it. I wasn't able to create a minimum reproducible test case, but the actual code I'm running is in https://github.com/frictionlessdata/tableschema-js/blob/ded028d7462e48584971faa9bae407cdc338433b/src/errors.js
I pulled down the example at that commit to try to see what's going on.
It looks to me like your mocha tests are correctly using the CommonJS build, but the karma tests are pulling in the ES6 build (I think this is because webpack is looking at the module field instead of main in our package.json).
Since 4.1.0 and 4.1.1 are working as they're supposed to for anyone using ES6 modules, I'm hesitant to revert that change, despite the fact that it seems to be causing issues for other downstream users.
I was able to fix the issue in tableschema-js by aliasing to the cjs build in the webpack config:
resolve: {
alias: {
'es6-error': path.join(__dirname, 'node_modules/es6-error/lib/index.js')
}
},
Sorry for the inconvenience. Seems like every other release causes issues with a different module bundler / compiler / environment. I'd love to have integration tests for some of the more common environments, but I just don't have the time these days. 😕