You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I already used Rive in other React apps with Vite and everything was working as intended. However, I cannot for the life of me makes things work with Next.js in that regard. Some Next.js devs seems to don't have any problem importing .riv files from public folder and I just don't understand what is different on my side.
I tried many solutions and none seems to work. I always get the dreaded "Bad header" and "Problem loading file; may be corrupt!".
The only way a Rive component seems to load is if I load it from an external source. The webpack or turbo bundler doesn't seems to find any .riv files in my public directory.
I tried "rive/cube.riv" as an alternative or again importing it as module with the url-loader and the webpack rules. Nothing works. Is there any Next.js dev that have a workaround? I am at wits end here... Many thanks!
The text was updated successfully, but these errors were encountered:
The animations don't load and I get this error in the console:
app-index.js:33 TypeError: a.startsWith is not a function
at Sa (rive.js:685:12)
at Ya (rive.js:728:73)
at eval (rive.js:3273:3)
at Module.eval (rive.js:3277:3)
at RuntimeLoader.loadRuntime (rive.js:3825:67) [...]
NextJS: 14.1.4
@rive-app/react-canvas": "^4.9.0"
I already used Rive in other React apps with Vite and everything was working as intended. However, I cannot for the life of me makes things work with Next.js in that regard. Some Next.js devs seems to don't have any problem importing .riv files from public folder and I just don't understand what is different on my side.
I tried many solutions and none seems to work. I always get the dreaded "Bad header" and "Problem loading file; may be corrupt!".
The only way a Rive component seems to load is if I load it from an external source. The webpack or turbo bundler doesn't seems to find any .riv files in my public directory.
Here's what my code currently looks like :
I tried "rive/cube.riv" as an alternative or again importing it as module with the url-loader and the webpack rules. Nothing works. Is there any Next.js dev that have a workaround? I am at wits end here... Many thanks!
The text was updated successfully, but these errors were encountered: