uniforms: uniforms-material 2.6.0: TypeError: Cannot read property 'prototype' of undefined
it seems that uniforms 2.6.0 broke uniforms-material, at least if you use it inside of another library. I get this error:
TypeError: Cannot read property 'prototype' of undefined
in AutoValidatedQuickMaterialForm (created by YourComponent)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 25 (13 by maintainers)
Commits related to this issue
- Uniform rolled back to 2.5.0 and locked due to issue with Babel https://github.com/vazco/uniforms/issues/638 — committed to amazingdesign/react-redux-mui-starter by chomamateusz 5 years ago
I’ve got the same issue in one project with
2.6.0.I was able to trace the issue down to the babel and filed an issue. Not sure when it will be fixed.
The problem seems to be related to the generated by tsc
es6code.After
This issue actually prevents using library when the code is transpiled by babel.
at the moment i stick with 2.5.0, it seems that the initial problem no longer occures with 2.5.0. I have to move on now on the project and will revisit this problem in some weeks. Maybe others will have similar problems, let’s see.
Fixed by 1df4a888427e67962f2536d7386b008319908c56 and released in v2.6.6.
@radekmie If I use 2.5.0 it runs to globalThis error in tests. If I use 2.6.1 it fails to render forms due to that
TypeError: Cannot read property 'prototype' of undefined.😕
Hmm, actually the code generated by
tscworks as-is if run in compatible env. So I still think it isbabelthat is incorrectly translatingsuper.blah()calls. In the end it doesn’t matter how we get the original code provided that it is valid. This code works in chrome as-isBut the compiled version fails https://babeljs.io/repl#?babili=false&browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=PTAEBcAsFNQYwPYBNYEsDOoDm0B20AnAQ3GiVACMBPCdOUAd1SlGnQDYIiCdwAoRLnThQARQCuqOAGtQAXlAAKAA7c84AJTyAfKADeoAG7dQAfSIBuUAWjhxBXGaLz4AGyLpM0AB6lcSTFUbXBE9PlAIyIpFLTDI-NAQCBhQfF9QV1R8ZIIEBkwAIgBhIlxcBBEbInJlXOVCcBoAclqKiqp6ptAEADNQcX9oHqyyAvCEiMFhJxd0cXqCADpojQtxiZs7BxmAalAARjWJgF9x44AacfNFiSlZBVuZS4jzNeO1gXdPUABBfXGVv94pt7I59mc-KcBAghCIAEIuR7SRQ_DR8aGwygufAMUBwmIY9AIVzQRauBBYRQUZYxDRAA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=true&fileSize=false&timeTravel=false&sourceType=module&lineWrap=false&presets=es2015&prettier=false&targets=&version=7.7.3&externalPlugins=