Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto was deprecated and needs replacement #2

Open
git4-me opened this issue Oct 2, 2022 · 1 comment
Open

crypto was deprecated and needs replacement #2

git4-me opened this issue Oct 2, 2022 · 1 comment

Comments

@git4-me
Copy link
Contributor

git4-me commented Oct 2, 2022

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.

@git4-me
Copy link
Contributor Author

git4-me commented Oct 6, 2022

@jenszech,
Wäre prima, wenn Du in den kommenden Tagen da mal reingucken könntest. Aktuell ist km200-api leider nicht mehr benutzbar. Ist schade. Ich will auch ungern deshalb das Rad neu erfinden.
Danke, Philipp

@git4-me git4-me closed this as completed Oct 6, 2022
@git4-me git4-me reopened this Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant