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.getRandomValues must be defined #15

Open
rbgtk opened this issue Apr 20, 2023 · 1 comment
Open

crypto.getRandomValues must be defined #15

rbgtk opened this issue Apr 20, 2023 · 1 comment

Comments

@rbgtk
Copy link

rbgtk commented Apr 20, 2023

I get the following error when I run the mnemonics command in the terminal:

Error: crypto.getRandomValues must be defined
    at Object.randomBytes (/home/rbgtk/.nvm/versions/node/v14.21.3/lib/node_modules/mnemonics/node_modules/@noble/hashes/utils.js:158:11)
    at rng (/home/rbgtk/.nvm/versions/node/v14.21.3/lib/node_modules/mnemonics/node_modules/bip39/src/index.js:135:49)
    at Object.generateMnemonic (/home/rbgtk/.nvm/versions/node/v14.21.3/lib/node_modules/mnemonics/node_modules/bip39/src/index.js:136:30)
    at Proxy.cli (/home/rbgtk/.nvm/versions/node/v14.21.3/lib/node_modules/mnemonics/src/cli.js:4:19)
    at Object.<anonymous> (/home/rbgtk/.nvm/versions/node/v14.21.3/lib/node_modules/mnemonics/bin/mnemonics:4:23)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)

I'm using debian 11.5 with NVM and I've tried these node versions:

  • lts/erbium -> v12.22.12
  • lts/fermium -> v14.21.3
  • lts/gallium -> v16.19.1
  • lts/hydrogen -> v18.15.0
@x1angli
Copy link

x1angli commented Jul 23, 2023

+1
v18.17.0 (LTS) Node.js has the same problem

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

2 participants