React native Can';找不到变量:存储
3个月以来,我一直在开发react原生应用程序,目前我们正在使用React native Can';找不到变量:存储,react-native,React Native,3个月以来,我一直在开发react原生应用程序,目前我们正在使用v0.21 在尝试升级应用程序以修复错误时,我: 运行brew更新和brew升级 对package.json进行了一些更改 运行npm安装 运行npm更新-g react native cli以在本地获取v0.1.10 此时,我尝试运行该应用程序,但无论是在iOS还是Android中,我都遇到了相同的错误: 因此,从逻辑上讲,我回到了origin/master,删除了我的node\u modules文件夹,并重新安装了reac
v0.21
在尝试升级应用程序以修复错误时,我:
- 运行brew更新和brew升级
- 对
package.json进行了一些更改
- 运行npm安装
- 运行
以在本地获取v0.1.10npm更新-g react native cli
origin/master
,删除了我的node\u modules
文件夹,并重新安装了react native cli v0.1.7。。。但我也犯了同样的错误
My package.json看起来像:
{
"name": "XXXXXX",
"version": "0.0.1",
"private": true,
"dependencies": {
"awesome-phonenumber": "^1.0.10",
"buffer": "^3.6.0",
"immutable": "^3.7.6",
"react-native": "^0.21.0",
"react-native-animatable": "^0.5.0",
"react-native-blur": "^0.7.10",
"react-native-button": "^1.3.1",
"react-native-code-push": "^1.5.3-beta",
"react-native-date": "^1.0.3",
"react-native-device-info": "^0.6.0",
"react-native-drawer-layout": "^0.4.0",
"react-native-facebook-ios": "file:lib/react-native-facebook-ios",
"react-native-facebook-login": "^1.0.2",
"react-native-floating-label-text-input": "0.0.8",
"react-native-google-places-autocomplete": "^1.1.6",
"react-native-material-kit": "^0.2.4",
"react-native-modalbox": "^1.3.1",
"react-native-onesignal": "file:lib/react-native-onesignal",
"react-native-parallax": "^0.2.2",
"react-native-parallax-scroll-view": "^0.16.17",
"react-native-router-flux": "^2.2.6",
"react-native-scrollable-tab-view": "^0.3.5",
"react-native-sync-now-android": "file:lib/react-native-sync-now-android",
"react-native-sync-now-ios": "file:lib/react-native-sync-now-ios",
"react-native-timer-ios": "file:lib/react-native-timer-ios",
"react-native-twitter-ios": "file:lib/react-native-twitter-ios",
"react-native-twitter-login": "0.0.2",
"react-native-utils": "^1.0.1",
"react-native-vector-icons": "^1.0.3",
"react-native-webrtc": "^0.1.5",
"react-redux": "^3.1.0",
"redux": "^3.0.2",
"redux-logger": "^2.0.1",
"redux-thunk": "^1.0.0",
"rnpm": "^1.4.1"
},
"scripts": {
"start": "react-native start",
"postinstall": "sh scripts/postinstall.sh"
},
"devDependencies": {
"react-native-cli": "^0.1.7"
}
}
我确信问题出在我的工具版本上,因为在我更新它们之后,所有的事情都发生了,代码都是一样的
以下是版本:
4.4.0Watchman
0.22.1Flow
0.1.7react native cli
export default variable = {};
它倾向于:
const variable = {};
export default variable;
在这件事上损失了24小时