Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SvelteKit support #107

Open
macmillen opened this issue Aug 22, 2024 · 1 comment
Open

SvelteKit support #107

macmillen opened this issue Aug 22, 2024 · 1 comment

Comments

@macmillen
Copy link

Currently when trying to build and preview a SvelteKit project using this library we get this error:

Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/projects/stackblitz-starters-zysvzp/node_modules/@atlaskit/pragmatic-drag-and-drop/element/adapter' is not supported resolving ES modules imported from /home/projects/stackblitz-starters-zysvzp/.svelte-kit/output/server/entries/pages/_page.svelte.js
Did you mean to import @atlaskit/pragmatic-drag-and-drop/dist/cjs/entry-point/element/adapter.js?
    at __node_internal_captureLargerStackTrace2 (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:101:5335)
    at new NodeError (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:101:4149)
    at finalizeResolution (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:158:10852)
    at moduleResolve (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:158:11119)
    at defaultResolve (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:158:12372)
    at ModuleLoader.defaultResolve (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:154:3284)
    at ModuleLoader.resolve (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:154:2989)
    at ModuleLoader.getModuleJob (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:154:1938)
    at https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:155:1047
    at _0x48ff51.link (https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/blitz.6352fbed.js:40:787732)
    at https://stackblitzstarterszysvzp-1gsx.w-credentialless-staticblitz.com/builtins.ddb8d84d.js:155:1002 {
  url: 'file:///home/projects/stackblitz-starters-zysvzp/node_modules/@atlaskit/pragmatic-drag-and-drop/element/adapter',
  code: 'ERR_UNSUPPORTED_DIR_IMPORT'
}

demo:
It works in only in dev. Try npm run build & npm run preview and it will fail.
https://stackblitz.com/edit/stackblitz-starters-zysvzp

@macmillen
Copy link
Author

macmillen commented Sep 2, 2024

Apparently it's not SvelteKit specific and it's happening during SSR.
#27 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant