Netlify functions, Web Crypto API (crypto.subtle), set AWS_LAMBDA_JS_RUNTIME to nodejs20.x
I am not posting this as a support request, but to help anyone else in the future.
I was having the following issue...
This error occurs because the Kinde SDK is trying to access the Web Crypto API (crypto.subtle), this is only available in nodejs19.x, and Netlify defaults to nodejs18.x.
https://docs.netlify.com/functions/optional-configuration/?fn-language=js#node-js-version-for-runtime-2
I was having the following issue...
TypeError: Cannot read properties of undefined (reading 'subtle')
at Object.<anonymous> (/var/task/node_modules/@kinde-oss/kinde-node-express/dist/index.cjs:63:237212)
at Module._compile (node:internal/modules/cjs/loader:1364:14) ...This error occurs because the Kinde SDK is trying to access the Web Crypto API (crypto.subtle), this is only available in nodejs19.x, and Netlify defaults to nodejs18.x.
https://docs.netlify.com/functions/optional-configuration/?fn-language=js#node-js-version-for-runtime-2
Learn about optional configuration settings you can use for more control over how your functions are built, deployed, and executed.
