nuxt-plotly
nuxt-plotly copied to clipboard
Does not provide an export named 'default'
Problem
Seems like plotly.js-dist-min/plotly.min.js does not provide an export named 'default' so it cannot be rendered 🤔
Dev checks
- [x]
npx nuxi@latest module add nuxt-plotly - [x] Add
nuxt-plotlyto the modules section ofnuxt.config.ts - [x] Add
plotly.js-dist-minto thevite.optimizeDeps.includesection ofnuxt.config.ts
I am having the exact same issue, following your instructions explicitly.
I just had the same problem, but for me the third checkbox in the bug template actually fixed it. So, apparently you need to enter this section into your nuxt.config.ts:
vite: { optimizeDeps: { include: ["plotly.js-dist-min"] } },
I have the same problem, but I noticed it only crashes in nuxt dev mode, when built it works just fine.