我从 Atom 上的 React Native 得到这个错误:
无法解析模块“react-native-screen”
这是我的步骤:
- 我跑了
npm install --save react-navigation
,我得到了以下信息:
- 然后我跑了
npm install
:
之后,当我运行我的应用程序时,我收到一个错误:
无法从“node_modules\react-navigation-stack\lib\module\views\StackView\StackViewCard.js”解析“react-native-screens”
构建 JavaScript 包失败。
原文由 Pierre-olivier Dubois-Nadeau 发布,翻译遵循 CC BY-SA 4.0 许可协议
您需要再安装 3 个库
react-native-gesture-handler
、react-native-reanimated
和react-native-screens
。参考: https ://reactnavigation.org/docs/en/getting-started.html#installing-dependencies-into-a-bare-react-native-project