MeshJS / mesh

An open-source library to advance Web3 development on Cardano
https://meshjs.dev
Apache License 2.0
200 stars 55 forks source link

Nanoid upgrade in 1.5.25 imports invalid #243

Closed WolfRayet4 closed 3 weeks ago

WolfRayet4 commented 2 months ago

In the lastest update the version of nanoid was upgraded to v5 (from v3). The upgraded version is not compatible with the way its being imported if mesh is being used in an ESM Module.

    Error Plugin:: require() of ES Module ./node_modules/@meshsdk/core/node_modules/nanoid/index.js from
    ./node_modules/@meshsdk/core/dist/core.cjs not supported.
    Instead change the require of index.js in ./node_modules/@meshsdk/core/dist/core.cjs to a dynamic import() which is
    available in all CommonJS modules.
    Code: ERR_REQUIRE_ESM
WolfRayet4 commented 2 months ago

Note downgrading mesh version resolved the issue