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

Can't load rive file because of an error #154

Open
FleetAdmiralJakob opened this issue Feb 20, 2023 · 5 comments
Open

Can't load rive file because of an error #154

FleetAdmiralJakob opened this issue Feb 20, 2023 · 5 comments
Labels

Comments

@FleetAdmiralJakob
Copy link

FleetAdmiralJakob commented Feb 20, 2023

In rive.ts in the browser:
image
In rive.d.ts in the development enviroment (error is in line 176):
image
In Edge:
image
The React Component:
image

@zplata
Copy link
Contributor

zplata commented Feb 22, 2023

@FleetAdmiralJakob Sorry you're having troubles! The issue here is that the runtime cannot find your riv file. The src does not look to absolute paths from the file its used in. Rather, think of it as the path to the .riv file from the base of the deployed page. If you're using Next.JS, you might put the .riv in your public/ folder where those assets are exposed on your web application, and then you might specify:

src: 'old_star_to_new_star_yellow.riv'

@avivian avivian added the triage label Mar 9, 2023
@FleetAdmiralJakob
Copy link
Author

FleetAdmiralJakob commented Mar 12, 2023

Okay, I changed it, but the problem persists.
image

@Renesauve
Copy link

Same issue here

@Renesauve
Copy link

Renesauve commented Apr 1, 2023

Got this to work from this thread:

#153 (comment)

@MichalKurzewski
Copy link

MichalKurzewski commented Feb 14, 2024

for us the fix was to use import instead of direct src:
#132
React/Vite/Capacitor - but we are also using browser preview which is without Capacitor

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

5 participants