Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
After intalling the latest version ^4.1.0 of bitcoin-core in my react-native project i get Unable to resolve module http
It doesn't happen in node projects.
The most weird part is that module http doesn't really exist as it was malicious and removed. ( )
Thanks.
Expected behaviour
import Client from 'bitcoin-core' should work as expected.
Steps to reproduce
In a react-native project:
In terminal: yarn add bitcoin-core@latest In some javascript file: import Client from 'bitcoin-core'
Relevant log output
Error: Unable to resolve module http from ../node_modules/bitcoin-core/src/errors/rpc-error.js: http could not be found within the project or in these directories: node_modules/bitcoin-core/node_modules node_modules
6 | const { STATUS_CODES } = require('http');
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
^4.1.0
Operating system and version
LinuxMint 21.1
Machine specifications
i7, 32GB RAM.