crypto.createPrivateKey is not a function

Hi!
node v12.18.2
npm 6.14.6
framework7-cli 3.4.2

When I call node crypto.createPrivateKey from a no f7 project, it works. But if I move de .vue modules to the f7-cli project, I get a “crypto.createPrivateKey is not a function” error.

I found a similar problem here, related to a deprecated node version bundled with Electron: https://stackoverflow.com/questions/59166307/typeerror-crypto-createprivatekey-is-not-a-function

If I inspect methods in the object, I verify this corresponds to somthing like a old node version: https://node.readthedocs.io/en/latest/api/crypto/#cryptopseudorandombytessize-callback

Why is this happening? Is there any way to solve this?.

Thank you.

It is not related to Framework7. Seems like you have Node (or Electron if you use it) version that doesn’t support it

As I said, I’m using node v12.18.2 and supports it.

When I open Node from shell, I see this banner:
$ node
Welcome to Node.js v12.18.3.
If I call crypto module from shell, I can see the methods:
[…]
createHmac: [Function: createHmac],
createPrivateKey: [Function: createPrivateKey],
createPublicKey: [Function: createPublicKey],
createSecretKey: [Function: createSecretKey],
createSign: [Function: createSign],
createVerify: [Function: createVerify],
[…]
Now. If I see crypto from the f7 project by Vue DevTools, I can’t see the same methods.
$vm0.crypto
[…]
constants:
createCipher:
createCipheriv:
createCredentials:
createDecipher:
createDecipheriv:
createDiffieHellman:
createDiffieHellmanGroup:
createECDH:
createHash:
createHmac:
createSign:
createVerify:
getCiphers:
[…]
So… this is a problem inside the F7-vue-cordova project started by Framework7 cli.