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

Error: undefined is not an object (evaluating 'EventPluginHub.injection') on react-dom@16.5.0 #1096

Closed
jeremygrant opened this issue Sep 7, 2018 · 8 comments

Comments

@jeremygrant
Copy link

jeremygrant commented Sep 7, 2018

Hi guys,

I just ran into this problem and thought I'd let you know. I'll try and dig into it a little more, but just in case someone else runs into it or wants to pick it up

The problem

React Native Web doesn't work with react-dom@16.5.0

It seems that React DOM has removed some functionality that React Native Web requires

undefined is not an object (evaluating 'EventPluginHub.injection')

Which is likely due to facebook/react#13539 causing it to fail here https://github.com/necolas/react-native-web/blob/master/packages/react-native-web/src/exports/createElement/index.js#L17-L21

How to reproduce

https://codesandbox.io/s/542j6l8m8x

Expected behavior

That it all looks pretty

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): 0.8.*
  • React (version): 16.5.0
  • Browser: Any

Cheers,
Jeremy

@necolas
Copy link
Owner

necolas commented Sep 7, 2018

Thanks

@necolas
Copy link
Owner

necolas commented Sep 10, 2018

Waiting for React to put out a patch release reintroducing the API. RNW 0.9.0 will be compatible with React 16.5.x

@gaearon
Copy link

gaearon commented Sep 13, 2018

facebook/react#13598 is in 16.5.1.
So this should fix it: facebook/react#13598.

@vladp
Copy link

vladp commented Sep 15, 2018

Using RNW 0.8.10 and RN 16.5.1 -- still not working for me. Same error

I also checked that in my node_module/react I have the 16.5.1 package.json -- and I do.
setting react, react-dom, react-art to 16.4.2 fixes, the problem in the mean time, for me.

my package json:



{
  "name": "wrnw-csr-cra",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "babel-polyfill": "^6.26.0",
    "bootstrap": "^3.3.7",
    "compression": "^1.7.3",
    "hi-base32": "^0.5.0",
    "immutable": "3.8.2",
    "lodash": "^4.17.10",
    "prop-types": "^15.6.2",
    "pubsub-js": "^1.6.1",
    "react": "^16.5.1",
    "react-art": "^16.5.1",
    "react-bootstrap": "^0.32.4",
    "react-dom": "^16.5.1",
    "react-dropzone-component": "^3.2.0",
    "react-native-vector-icons": "^5.0",
    "react-native-web": "^0.8.10",
    "react-router-dom": "^4.3.1",
    "react-scripts": "1.1.5",
    "resize-observer-polyfill": "^1.5.0",
    "tree-model": "^1.0.7",
    "url-search-params-polyfill": "^4.0.0"
  },
  "scripts": {
    "analyze": "source-map-explorer build/static/js/main.*",
    "flow": "$(npm bin)/flow",
    "flow start": "$(npm bin)/flow start",
    "flow stop": "$(npm bin)/flow stop",
    "flow status": "$(npm bin)/flow status",
    "flow coverage": "$(npm bin)/flow coverage",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "ostart": "react-app-rewired start",
    "obuild": "react-app-rewired build",
    "otest": "react-app-rewired test --env=jsdom",
    "postinstall": "$(npm bin)/flow-typed install"
  },
  "devDependencies": {
    "babel-eslint": "^9.0.0",
    "eslint": "^5.5.0",
    "eslint-config-react-native": "^3.0.0",
    "eslint-plugin-flowtype": "^2.50.0",
    "eslint-plugin-react": "^7.11.1",
    "eslint-plugin-react-native": "^3.2.1",
    "flow-bin": "^0.80",
    "flow-typed": "^2.5.1",
    "jest": "^23.5.0",
    "jest-cli": "^23.5.0",
    "react-app-rewired": "^1.6.2",
    "source-map-explorer": "^1.6.0",
    "treeify": "^1.1.0",
    "webpack-merge": "^4.1.4"
  }
}

The error stack trace

react-16 5 1-showstopper-rnw

@gaearon
Copy link

gaearon commented Sep 15, 2018

It wouldn't work until React Native Web merges the corresponding fix. :-)

@vladp
Copy link

vladp commented Sep 15, 2018

@gaearon , thank you. It seems I misunderstood the relations of what was being closed/fixed and where.

@stevensacks
Copy link

@necolas Do you have an ETA on this fix?

@sync
Copy link

sync commented Sep 17, 2018

there is a PR open: #1106

Repository owner locked and limited conversation to collaborators Sep 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants