<
 
 
 
 
×
>
hide You are viewing an archived web page, collected at the request of Ethereum Foundation using Archive-It. This page was captured on 22:31:52 May 01, 2021 , and is part of the Community collection. The information on this web page may be out of date. See All versions of this archived page. Loading media information

Cannot import Ethereum web3.js in React Native application

vivekellappenvivekellappen Member Posts: 3
I'm trying to import the Ethereum web3.js library into a React Native project.

Comments

  • vivekellappenvivekellappen Member Posts: 3
    Fixed:

    I've resolved this by editing line 2677 of the file /node_modules/bignumber.js/bignumber.js as follows:

    -if ( !crypto ) try { crypto = require('crypto'); } catch (e) {}
    +if ( !crypto ) try { crypto = require('crypto-js'); } catch (e) {}

    So it would appear this appear this could be an issue with the bignumber.js dependency, or the way it's being imported. I'm unable to open issues on their GitHub repo so posting here.


    https://github.com/ethereum/web3.js/issues/576.
Sign In or Register to comment.