progging / svelte-sortable

A Svelte wrapper component for SortableJS.
29 stars 2 forks source link

SvelteKit compatibilty #7

Open Valink opened 1 year ago

Valink commented 1 year ago

For some reasons, Sortable is not a valid SSR component :

Trace

Error: <Sortable> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules
    at Module.validate_component (/node_modules/svelte/internal/index.mjs:1748:15)
    at eval (/src/routes/admin/accommodations/[accommodationIdOrNew].svelte:447:31)
    at Object.$$render (/node_modules/svelte/internal/index.mjs:1771:22)
    at Object.default (root.svelte:46:41)
    at eval (/src/routes/admin/__layout@reset.svelte:140:77)
    at Object.$$render (/node_modules/svelte/internal/index.mjs:1771:22)
    at Object.default (root.svelte:40:39)
    at eval (/src/routes/__layout-reset.svelte:8:41)
    at Object.$$render (/node_modules/svelte/internal/index.mjs:1771:22)
    at root.svelte:38:37

SvelteKit version

in "@sveltejs/kit": "1.0.0-next.405" "svelte-sortable": "^0.1.0",

mylastore commented 4 months ago

When I try to install a get the following error.

`npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: mylastore@0.0.2 npm ERR! Found: svelte@4.2.9 npm ERR! node_modules/svelte npm ERR! dev svelte@"^4.2.7" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer svelte@"^3.0.0" from svelte-sortable@0.1.0 npm ERR! node_modules/svelte-sortable npm ERR! svelte-sortable@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! /Users/oscarquinteros/.npm/_logs/2024-01-28T21_02_03_269Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/oscarquinteros/.npm/_logs/2024-01-28T21_02_03_269Z-debug-0.log `