Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read properties of undefined (reading 'getMonitor') #46

Open
OnkelTem opened this issue Sep 21, 2023 · 0 comments
Open

Comments

@OnkelTem
Copy link

OnkelTem commented Sep 21, 2023

When I add a withScrolling-element, I start getting errors:

react-dom.development.js:22839 Uncaught TypeError: Cannot read properties of undefined (reading 'getMonitor')
    at ScrollingComponent.componentDidMount (index.js:163:1)
    at commitLayoutEffectOnFiber (react-dom.development.js:23305:1)
    at commitLayoutMountEffects_complete (react-dom.development.js:24688:1)
    at commitLayoutEffects_begin (react-dom.development.js:24674:1)
    at commitLayoutEffects (react-dom.development.js:24612:1)
    at commitRootImpl (react-dom.development.js:26823:1)
    at commitRoot (react-dom.development.js:26682:1)
    at finishConcurrentRender (react-dom.development.js:25981:1)
    at performConcurrentWorkOnRoot (react-dom.development.js:25809:1)
    at workLoop (scheduler.development.js:266:1)
    at flushWork (scheduler.development.js:239:1)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:533:1)
componentDidMount @ index.js:163
commitLayoutEffectOnFiber @ react-dom.development.js:23305
commitLayoutMountEffects_complete @ react-dom.development.js:24688
commitLayoutEffects_begin @ react-dom.development.js:24674
commitLayoutEffects @ react-dom.development.js:24612
commitRootImpl @ react-dom.development.js:26823
commitRoot @ react-dom.development.js:26682
finishConcurrentRender @ react-dom.development.js:25981
performConcurrentWorkOnRoot @ react-dom.development.js:25809
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533

react-dom.development.js:22839 Uncaught TypeError: this.clearMonitorSubscription is not a function
    at ScrollingComponent.componentWillUnmount (index.js:172:1)
    at callComponentWillUnmountWithTimer (react-dom.development.js:22852:1)
    at safelyCallComponentWillUnmount (react-dom.development.js:22873:1)
    at commitDeletionEffectsOnFiber (react-dom.development.js:24129:1)
    at recursivelyTraverseDeletionEffects (react-dom.development.js:23989:1)
    at commitDeletionEffectsOnFiber (react-dom.development.js:24170:1)
    ...
    at commitDeletionEffectsOnFiber (react-dom.development.js:24118:1)
componentWillUnmount @ index.js:172
callComponentWillUnmountWithTimer @ react-dom.development.js:22852
...
finishConcurrentRender @ react-dom.development.js:25981
performConcurrentWorkOnRoot @ react-dom.development.js:25809
workLoop @ scheduler.development.js:266
flushWork @ scheduler.development.js:239
performWorkUntilDeadline @ scheduler.development.js:533


2next-dev.js:20 The above error occurred in the <Scrolling(div)> component:

    at ScrollingComponent (webpack-internal:///../../node_modules/react-dnd-scrollzone/lib/index.js:111:7)
    at DndProvider (webpack-internal:///../3-pages/node_modules/react-dnd/dist/cjs/core/DndProvider.js:40:11)
    at Tree
    at div
    at Styled.div

My code is as simple as:

const ScrollingComponent = withScrolling('div')

export default function Tree() {
  return (
    <DndProvider backend={HTML5Backend}>
      <ScrollingComponent>
        <TreeInternal />
      </ScrollingComponent>
    </DndProvider>
  )
}

Versions:

    "react-dnd": "15.1.2",
    "react-dnd-html5-backend": "15.1.2",
    "react-dnd-scrollzone": "^5.0.0",

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant