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

EventPluginRegistry: Cannot inject event plugin ordering more than once. #42

Closed
ominiverdi opened this issue Aug 30, 2016 · 13 comments
Closed

Comments

@ominiverdi
Copy link

trying to install all at latest version:

   "react": "15.3.1",
   "react-native": "0.32.0",

I got first errors about missing modules:

    "babel-preset-es2015": "^6.14.0",
    "babel-preset-react": "^6.11.1",
    "babel-preset-stage-2": "^6.13.0",

On the import of the module:

 EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.

anything I'm missing?

@vvo
Copy link
Contributor

vvo commented Aug 30, 2016

Hi, I really don't know what's happening here. Can you try to remove react-native from package.json? Maybe that's the issue

@ominiverdi
Copy link
Author

hi Vvo, thanks for your quick reply.
I tried to remove react-native from the package.json but still the same error.

here's below my package.json. If you see any problem.
There's some garbage around as I'm testing few options.

 { 
  "name": "xxxx",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start"
  },
  "dependencies": {
    "babel-preset-es2015": "^6.14.0",
    "babel-preset-react": "^6.11.1",
    "babel-preset-stage-2": "^6.13.0",
    "react": "15.3.1",
    "react-native": "0.32.0",
    "react-native-htmlview": "^0.5.0",
    "react-native-material-design": "^0.3.7",
    "react-native-material-design-styles": "^0.2.6"
  },
  "devDependencies": {
    "dom-serialize": "^2.2.1",
    "dom-serializer": "^0.1.0",
    "htmlparser2": "^3.9.1",
    "mediawiki": "0.0.14",
    "moment": "^2.14.1",
    "nodemw": "^0.10.1",
    "promise": "^7.1.1",
    "react-element-to-jsx-string": "^4.1.0",
    "react-to-jsx": "^1.3.2",
    "xmldom": "^0.1.22"
  }
}

@vvo
Copy link
Contributor

vvo commented Aug 31, 2016

I would try to remove packages/code and see when the issue disappears/when it appears.

As soon as you can prove here that react-element-to-jsx-string when present and called in a particular setup triggers an issue, we can work on it.

First you need to figure out with the minimum setup, how to reproduce the issue.

Once you have that, create a github repository and we will have a look, in the meantime I cannot help you more unfortunately. This is too vague as an issue to be solved, for now.

@ominiverdi
Copy link
Author

appreciated, I'll work on it and let you know.

@seekshiva
Copy link

@vvo Here's a minimal project reproducing this bug: seekshiva/JsxToStringBugRepro

If you run the project, you will get the error: "EventPluginRegistry: Cannot inject event plugin ordering more than once."

Once you comment out all occurrences of reactElementToJSXString in modules/App.js you will be able to reload and see a functional app.

@ominiverdi
Copy link
Author

thanks a lot guys, it worked :)

On Thu, Sep 8, 2016 at 8:41 PM, Shiva Nandan notifications@github.com
wrote:

@vvo https://github.com/vvo Here's a minimal project reproducing this
bug: seekshiva/JsxToStringBugRepro
https://github.com/seekshiva/JsxToStringBugRepro

If you run the project, you will get the error: "EventPluginRegistry:
Cannot inject event plugin ordering more than once."

Once you comment out all occurrences of reactElementToJSXString in
modules/App.js you will be able to reload and see a functional app.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#42 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDEi_04ID7UWLN_KJUZDsNvpdeJRfYbks5qoFbfgaJpZM4Jwuos
.

@seekshiva
Copy link

@ominiverdi Can you share what you did to get it working? I'm facing the same problem now.

@vvo
Copy link
Contributor

vvo commented Sep 9, 2016

Yep @ominiverdi it seems you solved the issue but how? I also fear it's a React "problem", see: facebook/react-native#8007

@vvo vvo reopened this Sep 9, 2016
@seekshiva
Copy link

See here: reduxjs/react-redux#230 (comment)

This used to be a problem with with react-native shipping its own version of react and not using npm react (facebook/react-native#2985) but that issue was resolved and react-native now requires 'react' as a peerDependency. So I'm not sure why we get this error now.

@seekshiva
Copy link

@vvo FWIW, this issue doesn't exist when I use the react-to-jsx library mentioned in README.

@vvo
Copy link
Contributor

vvo commented Nov 1, 2016

@seekshiva did you fix it in the end?

@seekshiva
Copy link

I had a tight schedule and had to push something out soon, so I ended up using react-to-jsx.

@vvo
Copy link
Contributor

vvo commented Nov 2, 2016

Allright no prob

@vvo vvo closed this as completed Nov 2, 2016
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