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

Getting "Error: crypto.createCipher is not a function" when running with Node.js v22 #192

Open
juissi-t opened this issue Sep 17, 2024 · 0 comments

Comments

@juissi-t
Copy link
Contributor

I'm getting this error when trying to generate a token with Node.js v22:

/home/juissi/gh-public/external-auth-server/src/utils.js:86
    throw new Error(exception.message);
    ^

Error: crypto.createCipher is not a function
    at Object.encrypt (/home/juissi/gh-public/external-auth-server/src/utils.js:86:11)
    at Object.<anonymous> (/home/juissi/gh-public/external-auth-server/bin/generate-config-token-stdin.js:32:38)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
    at Module._load (node:internal/modules/cjs/loader:1127:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:166:5)
    at node:internal/main/run_main_module:30:49

Node.js v22.8.0

It looks like crypto.createCipher was removed in Node v22. It's still present in Node v21 and earlier.

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