Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotLottie will not load on web #1190

Open
arasrezaei opened this issue Feb 28, 2024 · 4 comments
Open

dotLottie will not load on web #1190

arasrezaei opened this issue Feb 28, 2024 · 4 comments
Labels

Comments

@arasrezaei
Copy link
Contributor

arasrezaei commented Feb 28, 2024

Description

Image.resolveAssetSource is not defined on web.

return { sourceDotLottieURI: Image.resolveAssetSource(source).uri };

for resolving the .lottie path i fixed it with expo-asset.

Version: 6.6.0

@matinzd
Copy link
Collaborator

matinzd commented Feb 29, 2024

For web, you need to follow the instructions in the README:
https://github.com/lottie-react-native/lottie-react-native?tab=readme-ov-file#web

@arasrezaei
Copy link
Contributor Author

For web, you need to follow the instructions in the README: https://github.com/lottie-react-native/lottie-react-native?tab=readme-ov-file#web

Yes I followed instructions, and it plays json files, and remote .lottie files, only when you require local .lottie file (no problem with .json) this error arises

@matinzd
Copy link
Collaborator

matinzd commented Mar 3, 2024

Can you provide a minimal reproducable?

@matinzd matinzd added the web label Mar 26, 2024
@ravanscafi
Copy link

I am having the same issue. Metro is configured to accept .lottie assets. It works on native, but not on web. If I switch to json, it starts working again.
Probably it's related to this issue: necolas/react-native-web#1666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants