4

I'm trying to create an ExpoPixi.Sketch View in React Native, but an error, 'Cannot read property 'viewManagersNames' of undefined' shows when the App loads. I cannot find anything on this error online.

import React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { Provider } from 'react-redux';
import EStyleSheet from 'react-native-extended-stylesheet';
import ExpoPixi from 'expo-pixi';
import { Constants } from 'expo';

export default class App extends React.Component {
  render() {
    const color = 0xff0000;
    const width = 5;
    const alpha = 0.5;
    return (
      <View style={styles.container}>
          <ExpoPixi.Sketch
                        strokeColor={color}
                        strokeWidth={width}
                        strokeAlpha={alpha}
                        style={{ flex: 1 }}
                    />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: Constants.statusBarHeight,
    backgroundColor: 'green',
  }
});

I tried this same code in another new React Native project, and it works fine, creating a screen where the user can draw using their finger.

This also shows up in the console, but I am using expo so I don't think I can use react-native link.

*No native NativeModulesProxy found among NativeModules, are you sure the expo-react-native-adapter's modules are linked properly

How can I resolve this error?

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Siddha Tiwari
  • 125
  • 3
  • 7
  • I don’t see viewManagersNames code anywhere in your code. Please post relevant code wr you have viewManagersNames code – Hemadri Dasari Sep 30 '18 at 05:50
  • I searched the entire codebase, and the only place `viewManagersNames` shows up is inside the `expo-react-native-adapter` node_module @Think-Twice – Siddha Tiwari Sep 30 '18 at 05:56
  • Did you found any solution? – kitta Oct 10 '19 at 08:28
  • I think it was that Expo Pixi used an older version of react-native-svg, which wasn't installed. I don't remember exactly, but I ended up using another library in place of Expo Pixi. – Siddha Tiwari Mar 22 '20 at 05:50

0 Answers0