multiformats / js-multiformats

Multiformats interface (multihash, multicodec, multibase and CID)
Other
233 stars 54 forks source link

bug: not importing in jest #299

Open NikZak opened 4 months ago

NikZak commented 4 months ago

I have this in my file

import { base64url } from 'multiformats/bases/base64';

I run jest for testing and get this error

  ● Test suite failed to run

    Cannot find module 'multiformats/bases/base64' from 'packages/bbsVC/src/rdfCanonicalize.ts'
...
    > 6 | import { base64url } from 'multiformats/bases/base64';
        | ^
...
      at Resolver._throwModNotFoundError (node_modules/.pnpm/jest-resolve@29.7.0/node_modules/jest-resolve/build/resolver.js:427:11)
      ...

Why is it not importing?

simonegosetto commented 1 week ago

same issue here