Skip to content

crypto was deprecated and needs replacement #2

@git4-me

Description

@git4-me

When using km200-api in one of my Angular projects I get:
TypeError: crypto_1.randomBytes is not a function. (In 'crypto_1.randomBytes(32)', 'crypto_1.randomBytes' is undefined)

The crypto package got deprecated few years back. By now the functionality got removed, hence the randomBytes function is undefined:
https://www.npmjs.com/package/crypto
Here it says:

This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.

Please update km200-api to either the built-in implementation, or use nanoid or something else. Otherwise km200-api won't work with current environments anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions