【发布时间】:2016-09-25 16:56:38
【问题描述】:
我正在尝试升级到最新版本的 react-native(react-native-0.26.2),这样我就可以使用 react-native-flux-router。
chrome 控制台只显示默认错误消息。
这是我的 package.json 文件
"dependencies": {
"@remobile/react-native-splashscreen": "^1.0.3",
"firebase": "^3.0.3",
"jwt-decode": "^2.0.1",
"moment": "^2.12.0",
"node-uuid": "^1.4.7",
"q": "^1.4.1",
"react": "15.0.2",
"react-native": "0.26.2",
"react-native-action-button": "^1.1.4",
"react-native-android-statusbar": "^0.1.2",
"react-native-animatable": "^0.6.0",
"react-native-button": "^1.5.0",
"react-native-device-info": "^0.9.3",
"react-native-drawer": "^2.2.3",
"react-native-file-uploader": "0.0.2",
"react-native-gifted-spinner": "0.0.4",
"react-native-image-picker": "^0.18.17",
"react-native-keep-screen-on": "^1.0.3",
"react-native-maps": "^0.4.2",
"react-native-modalbox": "^1.3.3",
"react-native-orientation": "^1.16.0",
"react-native-router-flux": "^3.26.5",
"react-native-simple-store": "^1.0.1",
"react-native-vector-icons": "^2.0.2",
"react-timer-mixin": "^0.13.3",
"underscore": "^1.8.3"
},
"devDependencies": {
"eslint": "2.10.2",
"eslint-plugin-react": "5.1.1",
"eslint-plugin-react-native": "1.1.0-beta"
}
这是 adb logcat 的输出
升级步骤: 注意* 为了使当前设置正常工作
"react-native": "0.25.1", “反应”:“0.14.5”, "react-native-router-flux": "3.22.23"
我必须安装这个特定版本的
“断言”:“1.3.0”
。原因是我遇到了缓冲区异常,搜索后发现solution to unknown module buffer
当我尝试升级时,我得到了最新版本的 react-native 和 react。然后我在看到 react-native 需要的警告消息后降级了 react 的版本
“反应”:“15.0.2”
然后我删除了 assert 包。我尝试了从卸载应用程序和重新编译的所有方法,我尝试重新启动计算机和手机。我从搜索中唯一找到的是这个search result
所以我什至在全球范围内安装了最新版本的 babel,但不确定它做了什么。然后我还确保我在所有视图的构造函数中都有一些东西。
export default class Home extends Component {
constructor(props) {
super(props);
this.state = {
foo: 'bar'
}
}
我不确定下一步该做什么,因为控制台中没有有用的错误。
【问题讨论】:
-
您能列出您目前在升级过程中采取的步骤吗?
-
当然可以。大约一个小时后会在电脑前
-
如果可能,请分享可重现此错误的最小代码库。
-
这就是问题所在,我不知道该放什么或如何猜测哪里出错了???我不确定这是我的代码还是我安装的第 3 方包
标签: reactjs react-native