You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
#34
Warning: React.createElement: 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 `SortableTree`.
When I look in node_modules/react-sortable-tree/dist/index.esm.js, the default export is:
var SortableTree = function SortableTree(props) {
return React.createElement(DndProvider, {
backend: HTML5Backend
}, React.createElement(SortableTreeWithoutDndContext, props));
};
So, I:
> console.log(DndProvider);
undefined
A little more inspection:
$ node
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> require('react-dnd')
{
DragDropContext: [Getter],
DragDropContextProvider: [Getter],
DragLayer: [Getter],
DragSource: [Getter],
DropTarget: [Getter]
}
> require('react-dnd/package.json').version
'2.5.4'
Gives:
When I look in
node_modules/react-sortable-tree/dist/index.esm.js
, the default export is:So, I:
A little more inspection:
...that's a very old version. More inspection:
It appears this project is badly out of date and completely broken.
The text was updated successfully, but these errors were encountered: