maptiler/maptiler-client-js

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

Closed this issue · 3 comments

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.

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

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

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