0

我今天遇到了这个奇怪的错误:Unable to resolve module `@expo/vector-icons/FontAwesome` from `node_modules/react-native-elements/src/checkbox/CheckBoxIcon.js`: @expo/vector-icons/FontAwesome could not be found within the project.

这个项目不使用 expo,它是使用 vanilla React Native CLI 构建的。我签入了CheckBoxIcon.js文件,node_modules但没有看到任何对@expo. 不确定这是否重要,但在此之前我正在从事一个 xpo 项目,但它不应该影响我正在从事的这个单独的项目,对吗?

我不知道如何解决这个问题,我尝试清除守望者手表,删除 node_modules 并重置 Metro 的缓存。

4

1 回答 1

0

npm start --reset-cache没有用,但npm start -- --reset-cache解决了我的问题。

于 2021-03-08T17:41:57.103 回答