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

react-dnd unsupported version automatically installed by webpack #448

Open
danielhamngren opened this issue Feb 2, 2019 · 3 comments
Open

Comments

@danielhamngren
Copy link

I have been following the examples in the currently online book at https://survivejs.com/react/introduction/ and was using version 2.5.6 of the boilerplate.git from https://github.com/survivejs/react-boilerplate.git

When arriving at the chapter "Implementing Drag and Drop" I ran into a problem with the code, or rather the package management.

Webpack downloaded the new dependencies for react-dnd and react-dnd-html5-backend automatically as expected. The version automatically downloaded were 7.0.2 but then the code examples in https://survivejs.com/react/implementing-kanban/drag-and-drop/ didn't work.

I got the error TypeError: React.createContext is not a function.

In order to fix the error, I manually set the version of react-dnd and react-dnd-html5-backend in package.json. The latest version that works with the current code is 2.6.0.

@matteobortolazzo
Copy link

Hi, same issue here.

These are my dependencies:

"react": "^15.1.0",
"react-dnd": "^10.0.2",
"react-dnd-html5-backend": "^10.0.2",

What should be set to 2.6.0?

@bebraw
Copy link
Member

bebraw commented May 2, 2020

Hi,

The demo project has been designed to work with the versions below:

    "react-dnd": "^2.1.4",
    "react-dnd-html5-backend": "^2.1.2",
    "react-dom": "^15.1.0",

Here's the source for reference: https://github.com/survivejs/react-book/tree/dev/project_source/implementing_kanban/06_drag_and_drop/kanban-app .

@matteobortolazzo
Copy link

Oh ok thanks! I didn't expect a jump from 10 to 2, but copying the whole package.json made it work!

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

3 participants