为了添加它,我运行了以下命令:
yarn workspace mobile add react-native-webview
Run Code Online (Sandbox Code Playgroud)
我确实查看了下面的错误所指定的node_modules文件夹,并且react-native-webview显然在那里。然而,仍然总是抛出这个错误?我什至执行了红色错误屏幕上的反应本机轮廓的步骤,该屏幕显示模块显示为缺失但实际上存在。
Error: Unable to resolve module `react-native-webview` from `index.js`: react-native-webview could not be found within the project or in these directories:
../../node_modules
/Users/kurnalsaini/Documents/test-mono/packages/mobile/node_modules
Run Code Online (Sandbox Code Playgroud)
我是否应该修改我的 Metro-config 文件或其他一些配置文件才能使其正常工作?因为对我来说,令人难以置信的是,它告诉它正在查找正确的文件夹,但仍然说它不存在。