我遵循了这里的简单说明: https://docs.expo.dev/versions/latest/sdk/lottie/
但是当我尝试运行该应用程序时,这是我收到的错误:
expo Uncaught Error: lottie-react-native: The module @lottiefiles/react-lottie-player is missing.
我尝试安装缺少的所有内容,但一直告诉我该存储库不存在:
#npx expo install @lottiefiles/react-lottie-player
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/lottiefiles/react-lottie-player.git
npm ERR! ERROR: Repository not found.
回购协议有问题吗? 我可以手动安装吗?
这很奇怪,但我找到了一个非常有效的解决方案。
在网络上,我使用的是react-lottie,而不是官方文档中所述的lottie-react-native。
我希望这个解决方案对与我处境相同的人有用。