tooltips icon indicating copy to clipboard operation
tooltips copied to clipboard

Svelte 5 Compatability

Open evaneliasyoung opened this issue 1 year ago • 0 comments

When attempting to use the use:tooltip action or <Tooltip content={{component: ...}}>...</Tooltip> in the Svelte 5 Release Candidate ([email protected]) I encounter this error. I understand that Svelte 5 has not officially released, however support for the next generation would be a nice addition.

errors.js:86  Uncaught Svelte error: component_api_invalid_new
Attempted to instantiate node_modules/@svelte-plugins/tooltips/dist/action-tooltip.svelte with `new Action_tooltip`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
    at component_api_invalid_new (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:331:19)
    at check_target (http://localhost:5173/node_modules/.vite/deps/chunk-QAZS5SUY.js?v=9c134686:215:5)
    at new Action_tooltip (http://localhost:5173/node_modules/.vite/deps/@svelte-plugins_tooltips.js?v=9c134686:392:3)
    at http://localhost:5173/node_modules/.vite/deps/chunk-QAZS5SUY.js?v=9c134686:201:26
    at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:839:23)
    at update_effect (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:957:21)
    at create_effect (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:1480:7)
    at branch (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:1602:10)
    at http://localhost:5173/node_modules/.vite/deps/chunk-QAZS5SUY.js?v=9c134686:195:17
    at update_reaction (http://localhost:5173/node_modules/.vite/deps/chunk-DKFFVF6O.js?v=9c134686:839:23)
component_api_invalid_new @ errors.js:86
check_target @ legacy.js:9
Action_tooltip @ tooltip.svelte:235
(anonymous) @ hmr.js:42
update_reaction @ runtime.js:286
update_effect @ runtime.js:458
create_effect @ effects.js:110
branch @ effects.js:318
(anonymous) @ hmr.js:33
update_reaction @ runtime.js:286
update_effect @ runtime.js:458
create_effect @ effects.js:110
block @ effects.js:310
(anonymous) @ hmr.js:24
onShow @ action.js:43

evaneliasyoung avatar Jul 21 '24 21:07 evaneliasyoung