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

The requested module '@glidejs/glide' does not provide an export named 'default' #674

Open
Ahmed-M-Yasser opened this issue Oct 28, 2023 · 2 comments

Comments

@Ahmed-M-Yasser
Copy link

Ahmed-M-Yasser commented Oct 28, 2023

I'm using glidejs with sveltekit. It's working perfectly fine in my localhost, but after deployment, I'm getting this error

The requested module '@glidejs/glide' does not provide an export named 'default'

<script> ... import Glide from '@glidejs/glide'; //getting the error here on the deployment server only ... </script>

This is how I'm referencing glide.core.min.css
<svelte:head> <link rel="stylesheet" href="../node_modules/@glidejs/glide/dist/css/glide.core.min.css" /> </svelte:head>

@ericmorand
Copy link
Contributor

This is likely a sveltekit issue. Glide works perfectly fine when imported by a JavaScript module and bundled using browserify or rollup.

@Ahmed-M-Yasser
Copy link
Author

The issue is gone once I imported glide like this

<svelte:head>
	<script src="node_modules/@glidejs/glide/dist/glide.min.js"></script>
	<link rel="stylesheet" href="../node_modules/@glidejs/glide/dist/css/glide.core.min.css" />
</svelte:head>

But still, I'm curious to know why it happens with sveltekit when it's imported like this import Glide from '@glidejs/glide';

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

2 participants