Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

undefined is not an object (evaluating '_reactNative.UIManager.RNSVGRenderable.NativeProps') #2

Closed
webmariner opened this issue Aug 3, 2016 · 3 comments

Comments

@webmariner
Copy link

Hi there,

I've created a new React Native project (RN 0.30.0, React 15.2.1, Node 4.4.0) and installed this package as follows:

$ react-native init PathJSChartsDemo
$ cd PathJSChartsDemo
$ npm install --save react-native-pathjs-charts
$ rnpm link

I then imported Bar and added the example and data the index.ios.js file:

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';
import {Bar} from 'react-native-pathjs-charts';

class PathJSChartsDemo extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Bar
          data={sampleData.bar.data}
          options={sampleData.bar.options}
          accessorKey='v'/>
      </View>
    );
  }
}

const sampleData = {
    bar: {
        data: [
            [{
                "v": 49,......

I noticed that rnpm link completes with no output, in case that's relevant. When running the app I get the error in the issue title. The top of the stack is createNativeComponent.ios.js:36 in react-native-svg/lib. Do you have any ideas what I might be doing wrong?

Thanks!
James

@caledhwa
Copy link
Contributor

caledhwa commented Aug 4, 2016

I'm seeing this problem too with the latest version. I've noticed that there's no output as well and when I created the library two months ago, the linking worked fine. I was able to get linking to work today by targeting through rnpm link react-native-svg (which is the only native library reference). However, now I'm getting some other issues. So, I'll keep working the issue. @webmariner - try the rnpm link react-native-svg and see if you can get it working. I'm going to chew on this to figure out what's going on.

@caledhwa
Copy link
Contributor

caledhwa commented Aug 4, 2016

Ok, here's what I figured out:

  1. React-Native link is no longer finding sub-dependencies
  2. To work with 0.30, you need the latest react-native-svg

Updating this fixed running on both iOS and Android. Give it a try now after an update on NPM. The latest version that fixes this is 0.0.20 (on NPM).

Reference #3

@webmariner
Copy link
Author

Hi! I removed and reinstalled both this and react-native-svg via npm, then did rnpm link, and hey presto I now have a chart. Thanks for your help! 👍

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

2 participants