我在更新本地v0.6.0之后得到这些错误。我甚至尝试从头开始创建一个项目,但我仍然遇到这些错误。有没有人见过这个?这段代码以前工作过。任何想法如何解决这个问题?
错误:无法读取属性'无'未定义的 堆: index.ios.bundle:24163 要求index.ios.bundle:244 index.ios.bundle:23216 要求index.ios.bundle:244 index.ios.bundle:1187 要求index.ios.bundle:244 index.ios.bundle:1116 要求index.ios.bundle:244 Object.ErrorUtils.applyWithGuard index.ios.bundle:880 要求index.ios.bundle:195 网址:未定义 line:undefined 消息:无法读取属性'无' of undefinedhandleException @ index.ios.bundle:7033
index.ios.bundle:35950正在运行的应用程序" TestApp"使用appParams:{" rootTag":1," initialProps":{}}。 DEV === true,开发级别警告为ON,性能优化为OFF
index.ios.bundle:7033错误:不变违规:应用程序TestApp尚未注册。 堆: Object.AppRegistry.runApplication index.ios.bundle:35957 jsCall index.ios.bundle:7328 MessageQueueMixin._callFunction index.ios.bundle:7591 index.ios.bundle:7618 index.ios.bundle:7612 ReactDefaultBatchingStrategyTransaction.Mixin.perform index.ios.bundle:6143 Object.ReactDefaultBatchingStrategy.batchedUpdates index.ios.bundle:13907 Object.batchedUpdates index.ios.bundle:4686 网址:未定义 line:undefined 消息:不变违规:应用程序TestApp尚未注册。
答案 0 :(得分:1)
我想我发现了这个问题。它与我正在使用的组件有关,在我的案例{
"name": "wordAssessTimer",
"version": "",
"description": "",
"main": "conf.js",
"dependencies": {
},
"devDependencies": {
"cucumber": "0.4.9",
"protractor": "2.1.0"
},
"scripts": {
},
"author": "",
"license": ""
}
中。我需要做的就是删除组件中的react-native-device
文件夹。 node_modules
。
我还更新了位于组件文件夹AppName/node_modules/React-Native-Component/node_modules
中的package.json文件中的依赖项,并将react-native依赖项更改为(或类似的):
AppName/node_modules/React-Native-Component/package.json
您也可以尝试重新启动计算机。我注意到该节点开始打开多个进程,这可能会导致问题。
从终端中运行的项目根文件夹:
"peerDependencies": {
"react-native": ">= 0.4.0 < 1"
},
上面所有修复的组合已经为我修复了它。希望这有助于某人。