reactjs - ./~/react-tap-event-plugin/src/injectTapEventPlugin.js 中出现错误

标签 reactjs

菜鸟在这里使用react。尝试克隆并运行 https://github.com/strangebnb/react-airbnb

我克隆了。运行 npm 安装。然后是 webpack 但我明白了

ERROR in ./~/react-tap-event-plugin/src/injectTapEventPlugin.js
Module not found: Error: Cannot resolve module 'react/lib/EventPluginHub' in /Users/thomas/tom/node_modules/react-tap-event-plugin/src
 @ ./~/react-tap-event-plugin/src/injectTapEventPlugin.js 23:2-37

ERROR in ./~/react-tap-event-plugin/src/TapEventPlugin.js
Module not found: Error: Cannot resolve module 'react/lib/EventConstants' in /Users/thomas/tom/node_modules/react-tap-event-plugin/src
 @ ./~/react-tap-event-plugin/src/TapEventPlugin.js 22:21-56

ERROR in ./~/react-tap-event-plugin/src/TapEventPlugin.js
Module not found: Error: Cannot resolve module 'react/lib/EventPluginUtils' in /Users/thomas/tom/node_modules/react-tap-event-plugin/src
 @ ./~/react-tap-event-plugin/src/TapEventPlugin.js 23:23-60

ERROR in ./~/react-tap-event-plugin/src/TapEventPlugin.js
Module not found: Error: Cannot resolve module 'react/lib/EventPropagators' in /Users/thomas/tom/node_modules/react-tap-event-plugin/src
 @ ./~/react-tap-event-plugin/src/TapEventPlugin.js 24:23-60

ERROR in ./~/react-tap-event-plugin/src/TapEventPlugin.js
Module not found: Error: Cannot resolve module 'react/lib/SyntheticUIEvent' in /Users/thomas/tom/node_modules/react-tap-event-plugin/src
 @ ./~/react-tap-event-plugin/src/TapEventPlugin.js 25:23-60

ERROR in ./~/react-tap-event-plugin/src/TapEventPlugin.js
Module not found: Error: Cannot resolve module 'react/lib/ViewportMetrics' in /Users/thomas/tom/node_modules/react-tap-event-plugin/src
 @ ./~/react-tap-event-plugin/src/TapEventPlugin.js 27:22-58

ERROR in ./~/react-portal/build/portal.js
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /Users/thomas/tom/node_modules/react-portal/build
 @ ./~/react-portal/build/portal.js 17:29-71

我找到了https://github.com/thereactivestack/meteor-webpack/issues/21 (我看到这是最近的,阅读:昨天),在搞乱了我的packages.json,更改react,react-dom,material-ui版本号并运行npm i --save react-tap-event之后-plugin,我只剩下“只有”1 条错误消息

ERROR in ./~/react-portal/build/portal.js
Module not found: Error: Cannot resolve module 'react/lib/CSSPropertyOperations' in /Users/thomas/react-airbnb/node_modules/react-portal/build
 @ ./~/react-portal/build/portal.js 17:29-71

我是个新手,我不知道如何解决这个问题。非常欢迎任何提示。

谢谢

最佳答案

由于 React 中的更新,react-tap-event-plugin 中断

如果使用react版本^15.4.0,请将package.json中的react-tap-event-plugin更改为^2.0.0

关于reactjs - ./~/react-tap-event-plugin/src/injectTapEventPlugin.js 中出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40670018/

相关文章:

javascript - React-Bootstrap-Table-Next Sort 动态表上的字母数字字符串

reactjs - 如何在reactjs中动态创建 Canvas 并动态添加引用?

javascript - 在输入更改时更改子级内部的父级状态

reactjs - 如何更改 react 导航中的后退按钮路线

javascript - 使用 React 使用随机生成的字符串进行服务器端渲染?

javascript - react js : Why I'm unable to create closure?

reactjs - React Isomorphic Rendering - 处理窗口调整大小事件

xcode - 在 React Native 上安装 OneSignal - 链接器命令失败,退出代码为 1

javascript - 如何重定向文本字段输入进入表单提交的命令而不是按钮中途表单?

javascript - Typescript 包装类型