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

Missing imports with React 15.4.0 #85

Closed
stevewillard opened this issue Nov 16, 2016 · 22 comments
Closed

Missing imports with React 15.4.0 #85

stevewillard opened this issue Nov 16, 2016 · 22 comments

Comments

@stevewillard
Copy link

It looks like this plugin uses some React internals which got shifted around in 15.4.0

ERROR in ./~/react-tap-event-plugin/src/injectTapEventPlugin.js
Module not found: Error: Can't resolve 'react/lib/EventPluginHub' in '/Users/me/Documents/github/project/node_modules/react-tap-event-plugin/src'
 @ ./~/react-tap-event-plugin/src/injectTapEventPlugin.js 23:2-37
 @ ./src/app/entry.js
 @ multi app
@alexborisov
Copy link

https://facebook.github.io/react/blog/2016/11/16/react-v15.4.0.html

However, there is a possibility that you imported private APIs from react/lib/*, or that a package you rely on might use them. We would like to remind you that this was never supported, and that your apps should not rely on internal APIs. The React internals will keep changing as we work to make React better.

This is exactly the case. Also now react-router seems to also be broken because it's depending on react/lib/ReactMount

@twhitbeck
Copy link

twhitbeck commented Nov 16, 2016

I'm seeing all these react/lib/* modules in react-dom/lib now, however simply switching them over to that makes onTouchTap not work :/

@brendanmh
Copy link

brendanmh commented Nov 16, 2016

Did this issue start appearing today? I have just noticed it too, with react 15.2.1 and react-tap-event-plugin 1.0.0 with no apparent change in my code.

Edit - I am pulling in react 15.4.0

@petersendidit
Copy link

Pull request #82 will fix this issue for React 15.4.0

@stevewillard
Copy link
Author

@brendanmh yeah 15.4.0 was released today

@aclarkdev
Copy link

i'm having this same issue with react ^15.3.0 and react-tap-event-plug ^1.0.0

@mamachanko
Copy link

same here with

{
...
    "react-tap-event-plugin": "1.0.0",
    "react": "15.4.0",
...
}

@aclarkdev
Copy link

i recommend rolling back until fix... i went back to
"react": "15.3.0", "react-dom": "15.2.1", "react-redux": "4.4.5",

and everything works again

@s0meone
Copy link

s0meone commented Nov 16, 2016

There was some other issue besides the missing imports, this now fixed. Version 2.0.0 is now on npm and is compatible with React 15.4. Thanks for reporting!

@sfncook
Copy link

sfncook commented Nov 16, 2016

Seems like material-ui is still stuck on react-tap-event 1.0.0 :(

@danmo
Copy link

danmo commented Nov 16, 2016

What harm can a tiny deploy to production do ? right ? :) 💣

@ghost
Copy link

ghost commented Nov 17, 2016

We haven't changed our package.json (requirements) for quite some time. All versions are fix (see below). We deploy everyday. How can this happen now?

"dependencies": {
    "babel": "^5.6.23",
    "babel-core": "^6.14.0",
    "babel-loader": "^6.2.5",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-react-html-attrs": "^2.0.0",
    "babel-plugin-transform-class-properties": "^6.11.5",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-es2015": "^6.14",
    "babel-preset-react": "^6.11.1",
    "babel-preset-stage-0": "^6.5.0",
    "css-loader": "^0.25.0",
    "es6-promise": "^3.0.2",
    "giphy-api": "^1.2.1",
    "immutable": "^3.8.1",
    "inherits": "^2.0.3",
    "less": "^2.7.1",
    "less-loader": "^2.2.3",
    "material-ui": "^0.16.1",
    "minimatch": "^3.0.3",
    "moment": "^2.15.1",
    "pui-react-overlay-trigger": "^6.0.2",
    "pui-react-tooltip": "^6.0.2",
    "react": "^15.3.2",
    "react-addons-css-transition-group": "^15.3.2",
    "react-dom": "^15.3.2",
    "react-redux": "^4.4.5",
    "react-tap-event-plugin": "^1.0.0",
    "react-timeout": "^1.0.0",
    "redux": "^3.6.0",
    "redux-logger": "^2.6.1",
    "redux-promise": "^0.5.3",
    "redux-thunk": "^2.1.0",
    "style-loader": "^0.13.1",
    "webpack": "^1.13.2",
    "whatwg-fetch": "^1.0.0"
  },

@brendanmh
Copy link

brendanmh commented Nov 17, 2016

"react": "^15.3.2", means that you can install any react@15.x.x version, which includes react@15.4.0 which is causing the trouble.

You can try "react": "15.3.2", or "react": "~15.3.2",. However you will probably find that other modules will pull in react@15.4.0 too (like material-ui), so you will have to amend them.

@ghost
Copy link

ghost commented Nov 17, 2016

Sorry for spamming the thread.
thx @brendanmh. I assumed "^X.Y.Z" is a regex ..

ananavati added a commit to electrode-io/electrode-webpack-reporter that referenced this issue Nov 17, 2016
…ade issues (#8)

* upgrade react-tap-event-plugin to v2.0.0 to resolve react 15.4.0 upgrade issues

zilverline/react-tap-event-plugin#85

* update version of react and react-dom
@lucasconstantino
Copy link

Well, not wanting to flood here but you guys should have a look at https://yarnpkg.com/. It would most certainly avoid breaks on production.

@wingleungchoi
Copy link

Mates, I got familiar errors.

Unable to resolve some modules:

  "react/lib/EventPluginHub" in /Users/xxxxx/xxxx/xxx/node_modules/react-tap-event-plugin/src/injectTapEventPlugin.js (web.browser)
  "react/lib/EventConstants" in /Users/xxxxx/xxxx/xxx/node_modules/react-tap-event-plugin/src/TapEventPlugin.js (web.browser)
  "react/lib/EventPluginUtils" in /Users/xxxxx/xxxx/xxx/node_modules/react-tap-event-plugin/src/TapEventPlugin.js (web.browser)
  "react/lib/EventPropagators" in /Users/xxxxx/xxxx/xxx/node_modules/react-tap-event-plugin/src/TapEventPlugin.js (web.browser)
  "react/lib/SyntheticUIEvent" in /Users/xxxxx/xxxx/xxx/node_modules/react-tap-event-plugin/src/TapEventPlugin.js (web.browser)
  "react/lib/ViewportMetrics" in /Users/xxxxx/xxxx/xxx/node_modules/react-tap-event-plugin/src/TapEventPlugin.js (web.browser)

My environment was

├─┬ react@15.4.1
│ ├─┬ fbjs@0.8.6
│ │ ├── core-js@1.2.7
│ │ ├─┬ isomorphic-fetch@2.2.1
│ │ │ ├─┬ node-fetch@1.6.3
│ │ │ │ ├─┬ encoding@0.1.12
│ │ │ │ │ └── iconv-lite@0.4.15
│ │ │ │ └── is-stream@1.1.0
│ │ │ └── whatwg-fetch@2.0.1
│ │ ├─┬ promise@7.1.1
│ │ │ └── asap@2.0.5
│ │ └── ua-parser-js@0.7.12
│ ├─┬ loose-envify@1.3.0
│ │ └── js-tokens@2.0.0
│ └── object-assign@4.1.0
├── react-addons-create-fragment@15.4.1
├── react-addons-css-transition-group@15.4.1
├── react-addons-pure-render-mixin@15.4.1
├─┬ react-dimensions@1.3.0
│ └── element-resize-event@2.0.7
├── react-dom@15.4.1
├─┬ react-mounter@1.2.0
│ └── domready@1.0.8
├── react-paginate@2.2.3
├─┬ react-select@1.0.0-rc.2
│ └── react-input-autosize@1.1.0
├─┬ react-tap-event-plugin@1.0.0

When i rollback react to 15.0.1, it works

@mrdulin
Copy link

mrdulin commented Nov 24, 2016

@aclarkdev thanks.

@sfncook
Copy link

sfncook commented Nov 24, 2016

@wingleungchoi You need to upgrade to react-tap-event-plugin@2.0.0 I think there are newer versions of react too.

tocttou added a commit to Cloud-CV/Origami that referenced this issue Dec 22, 2016
metasean added a commit to LunaMinds/code-cafe that referenced this issue Dec 27, 2016
@lucasmonteiro001
Copy link

@aclarkdev your suggestion did solved my problem! Thx a lot! 👍

d3ming added a commit to d3ming/react-redux-material_ui-boilerplate that referenced this issue Jan 14, 2017
There was an issue with `react-tap-event-plugin`: `Error: Cannot resolve module 'react/lib/EventPluginHub'`
Updating `react` and `react-tap-event-plugin` per zilverline/react-tap-event-plugin#85 fixes this
@asidiali
Copy link

Updating to v2.0.0 of react-tap-event-plugin fixed this for me. I had to manually update my package file as it wasn't detecting an update via CLI for some reason.

@thomasmodeneis
Copy link

Oh this is just embarrassing, really.

jchip pushed a commit to jchip/electrode that referenced this issue Mar 16, 2017
…ade issues (electrode-io#8)

* upgrade react-tap-event-plugin to v2.0.0 to resolve react 15.4.0 upgrade issues

zilverline/react-tap-event-plugin#85

* update version of react and react-dom
@calbertts
Copy link

I don't understand why this pluging still exists, most of the time it's the reason for wasted time.

riseeverytime pushed a commit to riseeverytime/Origami that referenced this issue Feb 5, 2023
bestreviewsbookssoftware05 added a commit to bestreviewsbookssoftware05/electrode that referenced this issue Aug 24, 2024
…ade issues (#8)

* upgrade react-tap-event-plugin to v2.0.0 to resolve react 15.4.0 upgrade issues

zilverline/react-tap-event-plugin#85

* update version of react and react-dom
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