我正在尝试编译 react-native repo 的 master 分支以提交 PR。我正在关注文档 https://facebook.github.io/react-native/docs/android-building-from-source.html
但是完全按照文档所说的去做,我在 android 上收到以下错误:Requiring unknown module "react/lib/ReactPropTypesSecret
在 ios 上运行也会产生类似的错误:Unable to resolve module react/lib/ReactPropTypesSecret from /Users/aakash/Projects/TestingPR/node_modules/react-native/Libraries/Utilities/deprecatedPropType.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/react/lib/ReactPropTypesSecret
最佳答案
当基于 RN 0.28 或更早版本的 ReactNative-App 升级到 RN 0.30 或更高版本而不将“react”包更新到至少 15.3.0 时,会出现此问题。
你试过这个吗?
如果这不能解决您的问题,您应该提供您的 package.json。
关于React-Native:需要未知模块 "react/lib/ReactPropTypesSecret",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38938603/