Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material-ui response to breaking change in React 15.4.0? "Cannot resolve module 'react/lib/EventPluginHub'"

React v 15.4.0 was released this morning and seems to have included a change that broke react-tap-event-plugin v1.0.0 producing this error:

$ npm build
> [email protected] build /.../myProject
> node scripts/build.js
Creating an optimized production build...
Failed to create a production build. Reason:
Module not found: Error: Cannot resolve module 'react/lib/EventPluginHub' in /.../myProject/node_modules/react-tap-event-plugin/src

(note: I cleaned up the output a little)

According to THIS react-tap-event issue log version 2.0.0 of react-tap-event fixes the build problem. However, material-ui is still using react-tap-event version 1.0.0. What are the options here? The only options I can think of are:

  • Downgrade react and other packages as described in the link above
  • Wait for Material-UI to upgrade to react-tap-event 2.0.0

Any other solutions here? I'm pretty much dead in the water if I wanted to use react 15.4.0, as far as I can tell.

like image 230
Carl Rossman Avatar asked Nov 16 '16 21:11

Carl Rossman


2 Answers

Almost make sure you update the react-tap-event-plugin to the right version of react.

like image 128
JustDave Avatar answered Oct 13 '22 13:10

JustDave


material-ui version 0.16.3 is released to address the problem.

like image 38
Nikhil Baradwaj Avatar answered Oct 13 '22 15:10

Nikhil Baradwaj