BitGo/BitGoJS

Cannot find module 'node:crypto'

pgtestuser2614 opened this issue ยท 7 comments

After installing bitgo package. When i try to run the app. I get issue
Cannot find module 'node:crypto'
Require stack:

  • /data/node_modules/@noble/hashes/cryptoNode.js
  • /data/node_modules/@bitgo/sdk-core/dist/src/bitgo/wallet/index.js

If you are trying to use it in the browser, see web-demo for an example on the fallbacks needed for usage in a browser environment.

Hey @mmcshinsky-bitgo ,
I am using it with node.js
Node version: 16.14.2
bitgo version: 16.0.0

Still getting same issue
Can you tell me the latest stable version of bitgo

Code sample

import * as BitGoJS from "bitgo";
new BitGoJS.BitGo({ env, accessToken });

Are you running this code on a client or server environment?

I'm facing same error, any solution for this bug?

in my opinion, it's because of node version.
means that node_module version and node version are not compatible.
Try to upgrade node version. version >=16 will be ok.

i`m facing same error,any solution for this bug?

Node 16 is currently deprecated. I suggest upgrading to 20.