react-diagrams icon indicating copy to clipboard operation
react-diagrams copied to clipboard

Upgrading from 6.0.1-beta.2 to latest causing errors

Open jmsims2 opened this issue 2 years ago • 0 comments

I have a large app that I recently needed to upgrade from emotion 10 to emotion 11. During that upgrade, I had to upgrade react-diagrams to the latest since the version we had was dependent on emotion 10. Now I'm met with some random errors when trying to load a diagram like:

Uncaught TypeError: a.default is not a constructor
    at l.componentDidMount (NodeWidget.tsx?236b:72)
    at commitLifeCycles (VM353688 react-dom.development.js:19814)
    at commitLayoutEffects (VM353688 react-dom.development.js:22803)
    at HTMLUnknownElement.callCallback (VM353688 react-dom.development.js:188)
    at HTMLUnknownElement.nrWrapper (eval at module.exports (VM353636 addScript.js:1), <anonymous>:1:18652)
    at Object.invokeGuardedCallbackDev (VM353688 react-dom.development.js:237)
    at invokeGuardedCallback (VM353688 react-dom.development.js:292)
    at commitRootImpl (VM353688 react-dom.development.js:22541)
    at unstable_runWithPriority (VM353690 scheduler.development.js:653)
    at runWithPriority$1 (VM353688 react-dom.development.js:11039)

and

VM353667:1 Uncaught TypeError: Cannot read property 'disconnect' of undefined
    at l.componentWillUnmount (NodeWidget.tsx?236b:37)
    at callComponentWillUnmountWithTimer (VM353688 react-dom.development.js:19580)
    at HTMLUnknownElement.callCallback (VM353688 react-dom.development.js:188)
    at HTMLUnknownElement.nrWrapper (eval at module.exports (VM353636 addScript.js:1), <anonymous>:1:18652)
    at Object.invokeGuardedCallbackDev (VM353688 react-dom.development.js:237)
    at invokeGuardedCallback (VM353688 react-dom.development.js:292)
    at safelyCallComponentWillUnmount (VM353688 react-dom.development.js:19587)
    at commitUnmount (VM353688 react-dom.development.js:20109)
    at commitNestedUnmounts (VM353688 react-dom.development.js:20163)
    at unmountHostComponents (VM353688 react-dom.development.js:20443)

I'm trying to put together a small reproduction but struggling extracting the relevant pieces. I feel like it may be a bundling issue as one other relevant point is the errors go away if I downgrade out resize-observer-polyfill dependency down to 1.0.0 from 1.5.1.

Wasn't sure if anyone here might have any ideas off the top of their head to look at? Any help would be greatly appreciated.

jmsims2 avatar Aug 24 '21 01:08 jmsims2