maptiler / maptiler-client-js

MapTiler APIs wrapper in JavaScript & TypeScript
https://docs.maptiler.com/client-js/
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

Client breaks when used in a CJS context, QuickLRU is ESM only #36

Closed MarkusWendorf closed 8 months ago

MarkusWendorf commented 10 months ago

Hello,

this package emits *.cjs files so I assume it should support cjs as well. However by using quick-lru which is ESM-only this breaks during runtime.

Error [ERR_REQUIRE_ESM]: require() of ES Module /quick-lru/index.js

To fix this, one could downgrade to the older version quick-lru@5.1.1.

And a test should be added to make sure both cjs and esm work as intended.

jonathanlurie commented 10 months ago

Hey @MarkusWendorf , thanks for the feedback and tips, I'll look into this!

daanaerts commented 9 months ago

Any progress? It's just not usable at all like this. Was very excited about maptiler, now have to look into something else.

jonathanlurie commented 8 months ago

@daanaerts @MarkusWendorf Hello, the very last version (1.8.1) contains the fix. Let me know if you encounter any issue.