Не получается подключить web3js к приложению React Native

Cтолкнулась с проблемой при подключении web3 к приложению React Native.

Изначально подключение делала по этому гайду (https://levelup.gitconnected.com/tutorial-how-to-set-up-web3js-1-x-with-react-native-0-6x-2021-467b2e0c94a4) Всё сработало, но как только я перезапускаю приложение появляется ошибка: ReferenceError: Property 'Buffer' doesn't exist, js engine: hermes ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Дальше я в режиме Live reloading комментирую эти строки

const Web3 = require('web3')
const web3Rospen = new Web3('https://ropsten.infura.io/v3/myKey')

сохраняю код, приложение работает, опять же в режиме Live reloading раскоментирую эти строки обратно - приложение работает.

Но изначально просто взять и запустить приложение с web3 не получается. Может кто сталкивался с такой проблемой?


Ответы (0 шт):