小编Kin*_*ley的帖子

React Native无法解析模块@react-native/assets/registry

我\xe2\x80\x99 在我的 React Native (v0.68.2) 项目中已经面临一个奇怪的错误一周了,我真的很感谢任何帮助它让我发疯。

\n

由于某种原因,node_modules 中 @react-native 文件夹内的 asset 文件夹似乎自行删除,导致此错误:

\n

Error: unable to resolve module @react-native/assets/registry from /Users/xx/ApplicationPath/node_modules/react-native/Libraries/Image/resolveAssetSource.js: @react-native/assets/registry could not be found within the project or in these directories:

\n

据我所知,当我删除node_modules文件夹并运行时,yarn或者npm install资产文件夹在@react-native中正确安装时,但一段时间后它会随机被删除,我不知道为什么。@react-navigation/elements/src 文件夹中发生类似的事情,资产文件夹也被删除。

\n

删除node_modules并运行yarn后\n

\n

几分钟后

\n

\n

reactjs react-native

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

标签 统计

react-native ×1

reactjs ×1