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

Tried to register two views with the same name RNSVGPath register #145

Closed
tarekbazine opened this issue Jul 8, 2018 · 5 comments
Closed

Comments

@tarekbazine
Copy link

I got this error (i am using expo 25 -crna-, bellow my package.json) :

Tried to register two views with the same name RNSVGPath

register
    crna-entry.delta?platform=android&dev=true&minify=false:11071:18
createReactNativeComponentClass
    crna-entry.delta?platform=android&dev=true&minify=false:11596:24
requireNativeComponent
    crna-entry.delta?platform=android&dev=true&minify=false:29312:43
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:202846:61
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:202651:12
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:202528:24
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:202332:32
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:202296:34
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:202091:47
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:201328:35
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:149377:40
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:108331:28
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:102267:24
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:92:38
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
<unknown>
    crna-entry.delta?platform=android&dev=true&minify=false:1407:21
loadModuleImplementation
    crna-entry.delta?platform=android&dev=true&minify=false:159:14
guardedLoadModule
    crna-entry.delta?platform=android&dev=true&minify=false:84:47
_require
    crna-entry.delta?platform=android&dev=true&minify=false:73:79
global code
    crna-entry.delta?platform=android&dev=true&minify=false:215004:8

my code :

<View>
                        <AnimatedCircularProgress
                            size={200}
                            width={3}
                            fill={this.state.fill}
                            tintColor="#00e0ff"
                            backgroundColor="#3d5875">
                            {
                                (fill) => (
                                    <Text style={styles.points}>
                                        { this.state.fill }
                                    </Text>
                                )
                            }
                        </AnimatedCircularProgress>
                    </View>

my package.json

{
  "name": "xxxx",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "jest-expo": "25.0.0",
    "react-native-scripts": "1.12.0",
    "react-test-renderer": "16.2.0"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^6.3.1",
    "d3-shape": "^1.2.0",
    "expo": "^25.0.0",
    "mobx": "^4.1.1",
    "mobx-react": "^5.0.0",
    "native-base": "^2.4.1",
    "react": "16.2.0",
    "react-native": "0.52.0",
    "react-native-awesome-alerts": "^1.0.7",
    "react-native-circular-progress": "^1.0.0",
    "react-native-pathjs-charts": "^0.0.34",
    "react-native-svg-charts": "^4.2.0",
    "react-navigation": "^1.5.8",
    "victory-native": "^0.15.0"
  }
}

@Jacse
Copy link
Collaborator

Jacse commented Jul 13, 2018

Sounds like you've installed react-native-svg twice. Does it come pre-packaged with expo? Try uninstalling it.

@lexor90
Copy link

lexor90 commented Jul 23, 2018

Hey there, thanks for this library. This issue can be solved by simply removing "react-native-svg" as a direct dependency of this library (it's listed inside of the package.json). Maybe you can move it to "devDependencies" for examples purposes. To patch it rm -rf node_modules/react-native-circular-progress/node_modules/react-native-svg. I'll send a PR later.

Hope this helps.

@lexor90
Copy link

lexor90 commented Jul 23, 2018

Uhm, I forgot to mention that once you have removed the nested dependency, you have to make sure to install react-native-svg in your project and properly link its native module.

@lexor90
Copy link

lexor90 commented Jul 23, 2018

It seems like a PR is already pending for this: #147

@Jacse
Copy link
Collaborator

Jacse commented Jul 23, 2018

Merged 👍 Will publish to NPM one of the following days

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