【发布时间】:2020-02-19 23:14:52
【问题描述】:
嘿,我正在尝试在 react-native 中制作我的第一个应用程序,但在尝试安装 react-navigation 和 react-navigation 堆栈后遇到了问题。
当我尝试运行 react-native start 时出现此错误:
BUNDLE [android, dev] ./index.js ▓▓▓▓▓▓▓▓▓░░░░░░░ 57.2% (431/570)::ffff:127.0.0.1 - - [19/Feb/2020:23:06:17 +0000] "GET /index.bundle?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1"
error: bundling failed: Error: Unable to resolve module `@react-native-community/masked-view` from `node_modules/react-navigation-stack/lib/module/vendor/views/MaskedView.native.js`: @react-native-community/masked-view could not be found within the project.
但我的节点模块文件夹中有 react-native-community 并尝试再次安装它,但当我执行 npm install react-native-community 时它似乎不存在。
我也不确定这是否相关,但是当我执行 react-native run-android 时,它现在在 app:installDebug 步骤中卡在 99%。
编辑:修复需要执行 npm install @react-native-community/masked-view
【问题讨论】:
-
你能分享你的 package.json 文件吗?
标签: android reactjs react-native npm node-modules