react-sortable-tree
react-sortable-tree copied to clipboard
Element type is invalid
Hi,
when I try to run the storybook examples (or the package in any other of my projects), like with git clone https://github.com/frontend-collective/react-sortable-tree && cd react-sortable-tree/ && npm i && npm run storybook
, node 15.11.0 and npm 7.6.0 I receive the following error once opening:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of "App".
createFiberFromTypeAndProps@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:88488:26
createFiberFromElement@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:88511:42
reconcileSingleElement@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:77385:45
reconcileChildFibers@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:77445:57
reconcileChildren@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:79948:44
updateHostComponent@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:80470:20
callCallback@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:62195:19
dispatchEvent@[native code]
invokeGuardedCallbackDev@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:62244:29
invokeGuardedCallback@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:62299:36
beginWork$$1@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:87639:28
performUnitOfWork@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:86557:24
workLoopSync@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:86530:39
performSyncWorkOnRoot@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:86129:23
scheduleUpdateOnFiber@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:85557:28
updateContainer@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:88962:15
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:89387:22
unbatchedUpdates@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:86292:14
legacyRenderSubtreeIntoContainer@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:89386:21
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:358:32
Promise@[native code]
render@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:357:21
tryCatch@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:105155:44
invoke@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:105384:30
asyncGeneratorStep@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:332:103
_next@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:334:212
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:334:369
Promise@[native code]
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:334:108
tryCatch@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:105155:44
invoke@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:105384:30
asyncGeneratorStep@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:3832:103
_next@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:3834:212
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:3834:369
Promise@[native code]
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:3834:108
renderMain@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:4137:16
renderUI@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:4164:19
emit@http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:42908:39
http://0.0.0.0:3002/vendors~main.7bbb9661ec6158b26d07.bundle.js:3087:20
Is there an incompatibility with this nom / node / react version?
Thank you!
Regards Max
#821 might be related
Another solution for those of you who don't care about the newest updates is to use version 2.6.2. Works for me with [email protected]
I'm having the same issue. Even the solution from @movcmpret didn't work for me. Any chances this might be fixed soon? btw, pretty nice library this one!
Hello, the workaround from @movcmpret doesn't work for me either. It allows me to display the initial view of the tree, but any further interaction (click, drag and drop, etc.) crashes the component
The version works.
"react-sortable-tree": "^2.6.2",