我從package.json文件中刪除了一些未使用的依賴關係,然後我做了rm -rf node_modules
,然後npm install
。無法讀取未定義的屬性「風格」React Native
如果我現在建我的項目在Xcode我沒有得到任何錯誤,但如果我嘗試喲在模擬器上運行它,我得到紅屏如下:
在模擬器我得到:
TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null
at launchEditor (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/react-native/local-cli/server/util/launchEditor.js:153:29)
at Object.handle (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/react-native/local-cli/server/middleware/openStackFrameInEditorMiddleware.js:17:7)
at next (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/connect/lib/proto.js:174:15)
at Object.handle (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/react-native/local-cli/server/middleware/getDevToolsMiddleware.js:74:7)
at next (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/connect/lib/proto.js:174:15)
at Object.handle (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/react-native/local-cli/server/middleware/getDevToolsMiddleware.js:74:7)
at next (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/connect/lib/proto.js:174:15)
at Object.compression [as handle] (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/compression/index.js:205:5)
at next (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/connect/lib/proto.js:174:15)
at IncomingMessage.<anonymous> (/Users/boris/Projects/autralis-seller/AutralisSeller/node_modules/react-native/local-cli/server/middleware/loadRawBodyMiddleware.js:20:5)
我不知道發生了什麼事。任何想法如何解決它?
編輯
Scene.js是從反應本地路由器通量導航:
/**
* Copyright (c) 2015-present, Pavel Aksonov
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import React, { PropTypes } from 'react';
import { ViewPropTypes, Text } from 'react-native';
export default class extends React.Component {
// @todo - should all props be documented/specified here?
static propTypes = {
tabBarStyle: ViewPropTypes.style,
tabBarSelectedItemStyle: ViewPropTypes.style,
tabBarIconContainerStyle: ViewPropTypes.style,
tabBarShadowStyle: ViewPropTypes.style,
tabSceneStyle: ViewPropTypes.style,
tabStyle: ViewPropTypes.style,
tabTitleStyle: Text.propTypes.style,
tabSelectedTitleStyle: Text.propTypes.style,
tabTitle: PropTypes.string,
};
render() {
return null;
}
}
什麼是線30 Scene.js的源代碼? –
@BrunoGrieder我更新了我的問題。那是從'react-native router-flux'導航 – Boky
你可以發佈包含/調用你的項目場景的代碼嗎? –