我在我的项目工作中没有任何问题,我安装的最后一件东西是react-native-video-player,而且一切都很好。我遇到了一个正常的错误,我认为这是我刚刚添加的一个错误,一些简单的东西,它关闭了应用程序,正如预期的那样。我修复了错误,并试图再次启动项目,以迎接以下错误,在标题中看到.
TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')然后,当我无法访问的文件中的某些内容被窃听时,我尝试了一些我通常尝试的方法。我删除了node_modules,我的package.lock.json和重新运行的npm i. --我一直得到相同的错误,由几个不同的错误继续进行。在尝试了无数的解决方案后,卸载不同的npm包,我认为这是罪魁祸首,但没有成功。我得到错误和任何错误的方式--最初的错误--一直在改变,但现在我遇到了困难。手机仿真器屏幕为白色,我在我的“地铁捆绑终端”中看到以下三个错误:
TypeError: undefined is not an object (evaluating '_MaterialIcons.default.propTypes.style')
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.然后我创建了一个新的分支,在其中删除了node_modules、package.lock.json、yarn.lock,甚至是我的package.json。然后,当我尝试使用npx react-native run-is启动应用程序时,我得到了安装Reactive原住民的预期提示。我做了,而且安装好了。一旦安装好,我就得到了同样的错误!如果我搜索与错误相关的单词--没有,如果我试图搜索发生错误的页面--没有。因此,这意味着它必须在node_modules中,因为这些文件是搜索没有命中的唯一文件。我真的不知道如何解决这个问题,因为我没有在任何地方使用物质图标(包括我的yarn.lock,我的package.json,我的package.lock.json)。
总结一下我尝试过的步骤,但没有结果(没有顺序,我不再记得了).
yarn
node_modules、package.lock.json和yarn.lock有关的node_modules、package.lock.json和yarn.lock,运行yarn cache clean
ios/pods和ios/build和ios/Podfile.lock,并运行yarn cache clean
H 134运行npm uninstall material-icons
H 139运行yarn cache clean
run killall -9节点H 243H 144运行npm audit -fix
Restarted my计算机<代码>H 248G 249发布于 2022-08-10 18:52:39
我应该早点试一试,但它最终在react-native-video-player中被搞砸了。他们必须在最近添加了一些东西,因为我在不久前成功地使用了它。当他们上传不受欢迎的软件包时,一定要热爱
https://stackoverflow.com/questions/73310676
复制相似问题