Comments (10)
Hello 👋
After installing @lottiefiles/dotlottie-svelte 0.3.7
is giving me a runes
error. I'm on Svelte 4 so I don't have them, how can I disable runes?
Thanks
from dotlottie-web.
The PR that added the option should be reverted. In general, when using Svelte 5 together with component libraries one should not set the runes
compiler option, and instead opt in to runes mode by using runes in components. That solves OP's issue (this Library did nothing wrong so to speak).
from dotlottie-web.
Thanks @Antoine-lb @abegehr, I've reverted the runes attribute in the DotLottieSvelte component.
@moonlitgrace You can disable the runes mode only in your application. We're reverting this change as it causes compatibility issues for Svelte v4 users.
from dotlottie-web.
@theashraf Thank you for the explanation, hope things are going well there.
Since Svelte v5 and v4 are backward compatible (without the runes mode enabled), we could disable the runes mode for the DotLottie svelte component
Yep thats right, but our app was running on runes mode, so yea that showed up, obviously. disabling runes mode for component only is another good idea (so that I can again run my app on runes mode yeey! ^_^)
If you're interested, we would appreciate your contribution to update the dotlottie-svelte component to support this setup
Yes I'm interested, I'll send a PR right away.
from dotlottie-web.
This issue has been resolved in @lottiefiles/[email protected]
from dotlottie-web.
Thank you, @moonlitgrace, for your suggestion. Currently, Svelte v5 is not yet stable, and we plan to refactor from v4 to v5 only after it has been stabilized, based on the recommendation from the Svelte team here
Since Svelte v5 and v4 are backward compatible (without the runes mode enabled), we could disable the runes mode for the DotLottie svelte component. This would provide an easy transition without the need for a refactor or a beta release
If you're interested, we would appreciate your contribution to update the dotlottie-svelte component to support this setup
from dotlottie-web.
I'm also experiencing an issue on Svelte 4 with 0.3.7 (I also tried 0.3.6 and 0.3.5 without luck).
Stack trace:
app dev: 16:38:15 [ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace:
app dev: Error: Build failed with 1 error:
app dev: ../node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte:1:16: ERROR: [plugin: vite-plugin-svelte:optimize-svelte] $DIR/node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte:1:16 <svelte:options> unknown attribute 'runes'
app dev: at failureErrorWithLog ($DIR/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1472:15)
app dev: at $DIR/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:945:25
app dev: at $DIR/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1353:9
app dev: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
app dev: Hint:
app dev: Make sure your promises all have an `await` or a `.catch()` handler.
app dev: Error reference:
app dev: https://docs.astro.build/en/reference/errors/unhandled-rejection/
app dev: Stack trace:
app dev: at $DIR/node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte: ERROR: [plugin: vite-plugin-svelte:optimize-svelte] $DIR/node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte <svelte:options> unknown attribute 'runes':1:16
app dev: [...] See full stack trace in the browser, or rerun with --verbose.
The error seems to be Dotlottie.svelte <svelte:options> unknown attribute 'runes':1:16
(see here).
So the change introduced in 0.3.0 seems to break support for Svelte 4 (specifically, I'm on 4.2.18). Downgrading to package version 0.2.0 makes the error go away.
from dotlottie-web.
I'm also experiencing an issue on Svelte 4 with 0.3.7 (I also tried 0.3.6 and 0.3.5 without luck).
Stack trace:
app dev: 16:38:15 [ERROR] [UnhandledRejection] Astro detected an unhandled rejection. Here's the stack trace: app dev: Error: Build failed with 1 error: app dev: ../node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte:1:16: ERROR: [plugin: vite-plugin-svelte:optimize-svelte] $DIR/node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte:1:16 <svelte:options> unknown attribute 'runes' app dev: at failureErrorWithLog ($DIR/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1472:15) app dev: at $DIR/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:945:25 app dev: at $DIR/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1353:9 app dev: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) app dev: Hint: app dev: Make sure your promises all have an `await` or a `.catch()` handler. app dev: Error reference: app dev: https://docs.astro.build/en/reference/errors/unhandled-rejection/ app dev: Stack trace: app dev: at $DIR/node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte: ERROR: [plugin: vite-plugin-svelte:optimize-svelte] $DIR/node_modules/.pnpm/@[email protected][email protected]/node_modules/@lottiefiles/dotlottie-svelte/dist/Dotlottie.svelte <svelte:options> unknown attribute 'runes':1:16 app dev: [...] See full stack trace in the browser, or rerun with --verbose.
The error seems to be
Dotlottie.svelte <svelte:options> unknown attribute 'runes':1:16
(see here).So the change introduced in 0.3.0 seems to break support for Svelte 4 (specifically, I'm on 4.2.18). Downgrading to package version 0.2.0 makes the error go away.
I down graded to v0.2.0 and it works
from dotlottie-web.
@dummdidumm makes sense, enabling/disabling the runes mode in v5 should be the responsibility of the consumer of DotLottieSvelte
The PR that added the option should be reverted. In general, when using Svelte 5 together with component libraries one should not set the
runes
compiler option, and instead opt in to runes mode by using runes in components. That solves OP's issue (this Library did nothing wrong so to speak).
from dotlottie-web.
fixed in [email protected]
from dotlottie-web.
Related Issues (20)
- Arabic Text Alignment and Order Not Correct in Lottie Animations HOT 2
- "Dotlottie works fine on localhost but not in production" - content type detection causes animation not to load. HOT 6
- update loop and segment config dynamically during runtime in React HOT 2
- Mobile Safari hangs with "out of bounds memory access" HOT 5
- When loading with dotlottie-web, the animation will be stretched HOT 2
- react player does not render first frame until window is resized HOT 8
- Moved dotlottie-wc aren't reconnected HOT 2
- ReferenceError: Worker is not defined in React/Next.js applications HOT 4
- how to position dotlottie in react? HOT 1
- "intermission" doesnt seems supported (migrating from the old player) HOT 4
- Player does not work with jest HOT 3
- Resizing in DotLottieWorker leads to JS error - Cannot resize canvas after call to transferControlToOffscreen() HOT 4
- ReferenceError: Worker is not defined HOT 6
- Layout property not working HOT 3
- InvalidStateError: Failed to execute 'transferControlToOffscreen' on 'HTMLCanvasElement': Cannot transfer control from a canvas more than once.
- RuntimeError: memory access out of bounds HOT 5
- perf(web): set default DPR to 75% of machine's DPR HOT 1
- Parcel build fails with version 0.30.3 – Constructing a Worker with a string literal is not supported HOT 5
- Post-build errors HOT 2
- chore(web): add perf-test page for FPS & memory benchmarking under dotlottie-web GitHub pages HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotlottie-web.