嘿,我正在尝试让我的第一个应用程序在react-native中,但在尝试安装react导航和react导航堆栈之后,我遇到了一个问题。
当我尝试运行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.但我在node modules文件夹中有react-native-community,并尝试重新安装它,但当我安装npm时,它似乎并不存在。
此外,我不确定这是否相关,但当我执行react-native run-android时,它在应用程序:installDebug步骤中停留在99%。
Edit:修复了执行npm install @react-native-community/masked-view所需的问题

发布于 2020-03-29 02:22:34
将其安装到您的项目中
expo安装react-native-gesture handler react-native-reanimated -native-screens react-native-safe-area-context @react-native-community/masked-view
发布于 2020-02-20 07:51:04
在工作文件夹中运行npm list以查看项目文件夹中的所有依赖项并查找UNMET PEER DEPENDENCY,然后安装所有未满足的依赖项
发布于 2020-02-21 14:25:48
“@react-native-community/masked view”这个依赖产生错误。我认为你正在使用react-native导航,这是一个问题,因为在最新的react-native(Version> 0.60)中,这个问题正在发生,但是Version<0.60低于,工作正常。所以请降级你的react-native版本,之后这个问题就会得到解决。
https://stackoverflow.com/questions/60310704
复制相似问题