1 android npm node-modules reactjs react-native
嘿,我正在尝试使用 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.
Run Code Online (Sandbox Code Playgroud)
但是我的节点模块文件夹中有 react-native-community 并尝试再次安装它,但是当我执行 npm install react-native-community 时它似乎不存在。
此外,我不确定这是否相关,但是当我执行 react-native run-android 时,它现在在 app:installDebug 步骤中停留在 99%。
编辑:固定需要做 npm install @react-native-community/masked-view
小智 12
在您的项目中安装它
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
https://reactnavigation.org/docs/getting-started
| 归档时间: |
|
| 查看次数: |
5082 次 |
| 最近记录: |