我使用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"
},
我无法通过使用:var Parse = require('parse/react-native')
我收到此错误:
文件react-native
在node_modules/parse/react_native.js
内,但我的应用程序找不到它。我尝试重置模拟器,删除并重新安装node_modules
。
错误现在已成为一个已知问题:Issue
答案 0 :(得分:2)
内部文件node_modules/parse/lib/react-native/StorageController.react-native.js
更改此行:
var _reactNative = require('react-native');
到
var _reactNative = require('../../../react-native');
这仍然是github中的一个悬而未决的问题:
这个解决方案是由@jaredwitt发现的 在:
https://github.com/ParsePlatform/Parse-SDK-JS/issues/342
我可以通过更改node_modules / parse / lib / react-native / StorageController.react-native.js中的以下行来修补它