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. You are likely trying to load more than one copy of React. #49

Open
SarjuHansaliya opened this issue Sep 21, 2016 · 5 comments

Comments

@SarjuHansaliya
Copy link

I am facing this issue when I uncomment following line.

import { EditComponentFactory } from 'redux-autoform-bootstrap-ui';

Here is my package.json

"dependencies": {
    "react": "^15.3.2",
    "react-native": "^0.33.0",
    "react-redux": "^4.4.5",
    "react-select": "^1.0.0-rc.2",
    "redux": "^3.6.0",
    "redux-autoform": "^0.10.0",
    "redux-autoform-bootstrap-ui": "^1.7.1-experimental",
    "redux-form": "^6.0.2",
    "tcomb-form-native": "^0.6.1"
  },
  "devDependencies": {
    "babel-cli": "^6.14.0",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-es2015": "^6.14.0",
    "babel-preset-jason": "^1.0.1",
    "babel-preset-react": "^6.11.1",
    "babel-preset-react-hmre": "^1.1.1",
    "babel-preset-stage-0": "^6.5.0",
    "grunt": "^1.0.1",
    "grunt-tslint": "^3.2.1",
    "tslint": "^3.15.1",
    "typescript": "^1.8.10",
    "typings": "^1.3.3"
  }

And here is my imports in main file.

import React,{ Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TextInput,TouchableHighlight
} from 'react-native';
import {AutoForm} from 'redux-autoform';
import { EditComponentFactory } from 'redux-autoform-bootstrap-ui';

Can you help me what might be the issue?

@JonatanSalas
Copy link
Member

Tell me a bit of how you have congifured your enviroment? Do you use webpack, I answer this because I see you are using resct-native.
I'm thinking why this trouble could be happen, and then I remember that in the redux-autoform package.json react is included as a dependency and not as a devDependency. So, may be, when you try to use the EditComponentFactory this component wants to use its own react version, but you have added one, resulting on this error.

Probe the following, in your node_modules localize the redux-autoform-bootstrap-ui package. Then, inside this package, delete from the package node_modules react. And run it again, with that we could see if the problem it's related to what I tell you before.

Let me know if this help you!

@andrerpena
Copy link
Member

Also, we current don't support Redux Form 6. We're still adding support. We should probably do something so it will trigger an unmet peer dependency error

@SarjuHansaliya
Copy link
Author

@JonatanSalas No I am not using webpack.I am using direct grunt and typescript combination.
But I didn't get your "in your node_modules localize the redux-autoform-bootstrap-ui package. Then, inside this package" point.
Can you elaborate?

@SarjuHansaliya
Copy link
Author

Also I checked that in "redux-form 6.0.2" package.json , react is in devDependencies.

@JonatanSalas
Copy link
Member

@SarjuHansaliya we don't support yet redux-form v6. Redux-Autoform is based on Redux-form version 5.3.0. Try moving the 6.0.2 version to 5.3.0, reinstall and test it!

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