rive-react
rive-react copied to clipboard
Can't load rive file because of an error
In rive.ts in the browser:
In rive.d.ts in the development enviroment (error is in line 176):
In Edge:
The React Component:
@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'
Okay, I changed it, but the problem persists.
Same issue here
Got this to work from this thread:
https://github.com/rive-app/rive-react/issues/153#issuecomment-1416800429
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