Skip to content

Node JS: crypto import polyfill not taken into account? #49

@matteocargnelutti

Description

@matteocargnelutti

Hi there 👋 !

I see that there is now a polyfill to automatically import and declare crypto in the global scope.

Unfortunately, I'm getting the following error when using WARCRecord.create() after removing my own global import of crypto :

ReferenceError: crypto is not defined

For reference, I'm importing crypto as such to compensate for its absence:

import crypto from 'crypto'
global.crypto = crypto

I'm using warcio.js 2.0.1 with Node 18+.

Thanks in advance,

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