React-sortable-tree: Module not found: Error: Can't resolve 'redux/lib/createStore' in '/dnd-core/lib'

Created on 12 Jun 2018  路  9Comments  路  Source: frontend-collective/react-sortable-tree

I'm using "redux": "4.0.0" and the following error occurred when I implemented yarn start to build.

Here is the error message.
ERROR in ./node_modules/dnd-core/lib/DragDropManager.js Module not found: Error: Can't resolve 'redux/lib/createStore' in '/Users/moh/sites/wynd/back_office/node_modules/dnd-core/lib' @ ./node_modules/dnd-core/lib/DragDropManager.js 9:19-51 @ ./node_modules/dnd-core/lib/index.js @ ./node_modules/react-dnd/lib/DragDropContext.js @ ./node_modules/react-dnd/lib/index.js @ ./node_modules/react-sortable-tree/dist/main.js @ ./app/Resources/modules/Wynd/StoreModelingBundle/components/tree/index.tsx @ ./app/Resources/modules/Wynd/StoreModelingBundle/components/StoreModeling.tsx @ ./app/Resources/modules/Wynd/StoreModelingBundle/StoreModelingEndPoint.tsx @ ./app/Resources/modules/Wynd/StoreModelingBundle/StoreModelingBundle.ts @ ./app/Resources/modules/AppKernel.ts @ ./app/Resources/modules/app.ts @ ./app/Resources/modules/index.ts @ multi (webpack)-dev-server/client?http://localhost:8080 ./app/Resources/modules/index.ts

Most helpful comment

@medslt, cool I will upgrade the version of the react-dnd after I make sure that there are no breaking changes in the latest
update:
After looking at the package.json, it has been updated to version 3 and not the 2.6.0 that you mentioned here... I checked that the package-lock.json hasn't been updated so I will make an update

update#2:
Found out that I was totally wrong lol, the dnd-core is at 2.6.0 which definitely needs to be updated to v4, @wuweiweiwu already created #336 to update the react-dnd library so you can check there for progress

All 9 comments

i have the same problem ! :(

@medslt, have you tried removing node_modules and then do yarn install?

@lifejuggler I tried it I have the same problem :(

@medslt I will take a look and see if I can make a pr

@medslt @S-Eddine I have tried to replicate the issue with no success so please provide more information to the steps/ configurations that both of you have tried to get this error...

@lifejuggler to replicate the issue you have to use redux 4 in your project, there is a conflict with react-dnd "2.6.0" used by react-sortable-tree, I think to resolve the issue we have to upgrade react-dnd to the last version

@medslt Awesome!! your solution works great!
@lifejuggler that would be nice if we can update the version of react dnd

@medslt, cool I will upgrade the version of the react-dnd after I make sure that there are no breaking changes in the latest
update:
After looking at the package.json, it has been updated to version 3 and not the 2.6.0 that you mentioned here... I checked that the package-lock.json hasn't been updated so I will make an update

update#2:
Found out that I was totally wrong lol, the dnd-core is at 2.6.0 which definitely needs to be updated to v4, @wuweiweiwu already created #336 to update the react-dnd library so you can check there for progress

thanks @lifejuggler

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LogicMonsters picture LogicMonsters  路  5Comments

29er picture 29er  路  5Comments

oarashi picture oarashi  路  5Comments

mhiggs picture mhiggs  路  3Comments

2503shubham picture 2503shubham  路  3Comments