webrecorder / warcio.js

JS Streaming WARC IO optimized for Browser and Node
MIT License
32 stars 6 forks source link

ReferenceError: crypto is not defined #15

Closed austinfrey closed 3 years ago

austinfrey commented 3 years ago

When attempting to use WARCSerializar.create in NodeJS, an error is thrown due to the crypto variable not being defined. It looks like the tests pass since the @peculiar/crypto module is used to set a global crypto variable. Should I be doing that manually or could this module do that by default?

ikreymer commented 3 years ago

Ah, thanks for finding that! Yes, the module should do that by default, same as with Headers. Should be fixed now in 1.3.1.