Chepe77 Chepe77 - 10 months ago 129
React JSX Question

Unable to require Parse in react-native. 'Requiring unknown module "react-native"'

I have the following installed with npm:

"dependencies": {
"parse": "^1.9.1",
"react-native": "0.32.0",
"react-native-admob": "^1.1.5",
"react-redux": "4.4.5",
"redux": "3.5.2"

I am unable to require Parse into my react-native app by using:
var Parse = require('parse/react-native')

I get this error:

enter image description here

The file
IS inside
but my app wont find it. I have tried reseting the emulator, deleting and reinstalling

The error is now a know issue: Issue

Answer Source


Inside file node_modules/parse/lib/react-native/StorageController.react-native.js change this line:

var _reactNative = require('react-native');


var _reactNative = require('../../../react-native');

This is still an open issue in github:

This solution was found by @jaredwitt In:

I was able to patch it by changing the following line in node_modules/parse/lib/react-native/StorageController.react-native.js