React native react native未为android生成文件

React native react native未为android生成文件,react-native,React Native,关于这个问题,我可能已经读了几个小时了,但我找不到任何有用的东西。 我是react native的新手,在安装此软件包之前一切都很好: 反应本机弹出对话框 之后,我开始出现错误,然后使用npm uninstall命令删除了包。错误提示: To resolve try the following: 1. Clear watchman watches: `watchman watch-del-all`. 2. Delete the `node_modules` folder: `rm -rf

关于这个问题,我可能已经读了几个小时了,但我找不到任何有用的东西。 我是react native的新手,在安装此软件包之前一切都很好: 反应本机弹出对话框

之后,我开始出现错误,然后使用npm uninstall命令删除了包。错误提示:

To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
好吧,我做了这个,现在我不能让这个项目再次工作。我得到了这个错误:

Loading dependency graph, done.
Bundling `index.android.js`
  Transforming modules  ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░  86.0% (575/620)...(node:12608) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1626): UnableToResolveError: Unable to resolve module react-native/Libraries/Components/StaticContainer.react from D:\Code\Mobile\node_modules\native-base\dist\src\basic\Tabs\SceneComponent.js: Module does not exist in the module map or in these directories:
  D:\Code\Mobile\node_modules\react-native\Libraries\Components

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
(node:12608) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process Bundling `index.android.js`
我确实理解没有找到模块StaticContainer.react,但我没有在本机基础上做任何事情。我再次尝试删除node_模块并清理缓存,但没有成功

My package.json是:

{
  "name": "MyProject",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "native-base": "^2.0.10",
    "react": "15.4.2",
    "react-native": "0.43.0",
    "react-native-fcm": "^6.2.0",
    "react-native-localization": "^0.1.29",
    "react-native-popup-dialog": "^0.7.22",
    "react-native-tabs": "^1.0.9",
    "react-native-vector-icons": "^4.0.0",
    "react-navigation": "^1.0.0-beta.6"
  },
  "devDependencies": {
    "babel-jest": "19.0.0",
    "babel-preset-react-native": "1.9.1",
    "jest": "19.0.2",
    "react-test-renderer": "15.4.2"
  },
  "jest": {
    "preset": "react-native"
  }
}
有人能帮我吗

谢谢,
Joao

本地基本团队将依赖项更改为:
“react”:“^15.4.2”
“react”:“^16.0.0-alpha.3”
“react native”:“^0.39.2”
“react native”:“^0.43.0”

当您通过执行
rm-rf node_modules&&npm install
重新安装本机代码库时,它可能安装了具有上述更改的较新代码库

因此,您可以更新到较新版本,或者,如果由于其他依赖关系而无法升级,请在模块文件夹中手动进行更改:

~/node\u modules/native base/dist/src/basic/Tabs/

将第6行从

var StaticContainer=require('react-native/Libraries/Components/StaticContainer.react')

var StaticContainer=require('react-native/Libraries/Components/StaticContainer')


别忘了执行
npm启动--reset cache

很好,我做了正确的更新,工作非常出色。谢谢你的解释!不客气。请记住,第二个选项只是一个快速解决方案。最终,您需要逐个更新所有库。;-)