Open one-god opened 3 months ago
Experiencing the same issue
me too!! this happens when i try to call SlideHandle
Does anyone have a code example to reproduce it? I am unable to reproduce it using a new Vite project.
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!
Can you tell me what version of Vite you are using and possibly share your vite.config.ts
file?
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')
}
}
})
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.
Is there an existing issue for this?
Code of Conduct
Code Sandbox link
No response
Bug report