beyonk-group / svelte-mapbox

MapBox Map and Autocomplete components for Svelte (or Vanilla JS)
MIT License
343 stars 61 forks source link

Error when using with Svelte Kit #44

Closed LucianVoju closed 3 years ago

LucianVoju commented 3 years ago

Hello, I have this error when using with Svelte Kit: '/node_modules/fastq/queue.js?v=607b44ec' does not provide an export named 'default'

Thanks

christippett commented 3 years ago

I had a similar issue. Adding fastq to the list of included dependencies in svelte.config.cjs is what got it working for me.

module.exports = {

  ...

  kit: {
    vite: {
      optimizeDeps: {
        include: ["fastq"] // 👈
      }
    }
  }
}
antony commented 3 years ago

Looks like we need an equivalent to fastq or for fastq to become an esm module.

antony commented 3 years ago

I've raised https://github.com/mcollina/fastq/issues/44