Skip to content

Module not found: Error: Can't resolve 'crypto' in 'node_modules/asmcrypto.js' #20

@str

Description

@str

When pulling ual-anchor via webpack +v5, the following error is shown:

ERROR in ./node_modules/asmcrypto.js/asmcrypto.all.es8.js 4107:27-44
Module not found: Error: Can't resolve 'crypto' in '[...]node_modules/asmcrypto.js'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

The anchor libraries use AES_CBC from asmcrypto.js which imports nodejs "crypto", but its not necessary. The AES_CBC code doesnt actually use any of that crypto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions