小编Mau*_*ott的帖子

react-native 无法解析模块“warnOnce”

我的英语有点生疏,我很抱歉。

当我在 iOS 模拟器上启动 react-native 项目时出现错误。

为了排除与我的代码的任何冲突,我开始了一个新项目

react-native init demo

react-native start 

react-native run-ios --simulator="iPhone 6"
Run Code Online (Sandbox Code Playgroud)

现在是当我收到消息错误时

Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module `warnOnce` from `node_modules/react-native/Libraries/react-native/react-native-implementation.js`: warnOnce could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules: rm -rf node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-* …
Run Code Online (Sandbox Code Playgroud)

ios react-native

1
推荐指数
1
解决办法
6185
查看次数

标签 统计

ios ×1

react-native ×1