nuxt-plotly icon indicating copy to clipboard operation
nuxt-plotly copied to clipboard

Does not provide an export named 'default'

Open vanngoh opened this issue 1 year ago • 3 comments

Problem

Seems like plotly.js-dist-min/plotly.min.js does not provide an export named 'default' so it cannot be rendered 🤔

image

Dev checks

  • [x] npx nuxi@latest module add nuxt-plotly
  • [x] Add nuxt-plotly to the modules section of nuxt.config.ts
  • [x] Add plotly.js-dist-min to the vite.optimizeDeps.include section of nuxt.config.ts

vanngoh avatar Nov 01 '24 08:11 vanngoh

I am having the exact same issue, following your instructions explicitly.

dhait avatar Nov 14 '24 20:11 dhait

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"] } },

dyeske61283 avatar Nov 26 '24 21:11 dyeske61283

I have the same problem, but I noticed it only crashes in nuxt dev mode, when built it works just fine.

babyradJiri avatar Dec 17 '24 11:12 babyradJiri