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

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/nuka-carousel.js?v=0039cf81' does not provide an export named 'default' #1066

Open
2 tasks done
one-god opened this issue Aug 10, 2024 · 7 comments
Labels
Needs: Repro Issue would be improved by adding clear list of reproduction steps or codesandbox

Comments

@one-god
Copy link

one-god commented Aug 10, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Code Sandbox link

No response

Bug report

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/nuka-carousel.js?v=0039cf81' does not provide an export named 'default'
@rafyzg
Copy link

rafyzg commented Sep 10, 2024

Experiencing the same issue

@Vesals
Copy link

Vesals commented Sep 27, 2024

me too!! this happens when i try to call SlideHandle

@carbonrobot
Copy link
Contributor

Does anyone have a code example to reproduce it? I am unable to reproduce it using a new Vite project.

@carbonrobot carbonrobot added the Needs: Repro Issue would be improved by adding clear list of reproduction steps or codesandbox label Oct 8, 2024
@Vesals
Copy link

Vesals commented Oct 15, 2024

Does anyone have a code example to reproduce it? I am unable to reproduce it using a new Vite project.

Hi, sorry for the late reply. In my case (React Vite Project), I’m following the example from the Methods section of the official documentation. I tried importing like this: import { Carousel, SlideHandle } from 'nuka-carousel' and also like this: import SlideHandle, { Carousel } from 'nuka-carousel'.

However, even though I haven’t yet called SlideHandle in my useRef, I received the same error message in both cases and caused my page to go blank. The console error is as follows:
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/nuka-carousel.js?v=b2b01556' does not provide an export named 'default'.

I hope this provides some insight. Thank you!

@carbonrobot
Copy link
Contributor

Can you tell me what version of Vite you are using and possibly share your vite.config.ts file?

@Vesals
Copy link

Vesals commented Oct 15, 2024

Can you tell me what version of Vite you are using and possibly share your vite.config.ts file?

Sure, my Vite version is "vite": "^5.4.1", and here is my vite.config.ts file:

import { defineConfig } from 'vite'
import path from 'path'
import react from '@vitejs/plugin-react'

export default defineConfig({
  server: { port: 3000 },

  plugins: [react()],

  resolve: {
    alias: {
      // eslint-disable-next-line no-undef
      '~': path.resolve(__dirname, './src')
    }
  }
})

image

@carbonrobot
Copy link
Contributor

Thats essentially the same as our test app, assuming you didn't customize the TSConfigs to use a different bundler. This may be related, but I don't think this is an issue with nuka.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Repro Issue would be improved by adding clear list of reproduction steps or codesandbox
Projects
None yet
Development

No branches or pull requests

4 participants