-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
"Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency." #1366
Comments
You may run into issues when installing multiple modules globally, as the bitcore-lib won't be shared across them, each with another instance of bitcore-lib, which will lead to issues with |
So starting from a fresh AWS instance of Ubuntu 14.04, what would be a good way to install bitcore and bitcore explorers in a way that doesn't cause any errrors? |
Are you trying to setup a full node? |
No I'm just trying to use the Bitcore Explorers API to look up UTXOs and create transactions. |
Oh maybe I can just use: var bitcore = require('bitcore-lib'); instead of var bitcore = require('bitcore') I will test that out when I get home |
@braydonf This include guard stuff is really weird. Why do you have to do that? Nobody else is doing it in an npm package... |
@levino |
@fanatid Sorry, but I do not see the connection here. Fact is: One cannot include (require) bitcore twice. It is setting a global variable "bitcore" and checks for it "not being present". The only reason behind this can be, that bitcore relies on global variables, which it should not. Checking for the type of instance should work anyhow, shouldn't it? |
If you have two or more bitcore-lib instances than instanceof not worked. |
The error thrown from index.js file,
you can either update the version or mark it 'undefined'. |
No other library in the world does this. Should be removed. |
How much libraries in the world uses |
@braydonf whats the solution? I am using bitcore-lib and bitcore-explorers and receiving this error |
this validation should be removed |
Yeah it should... from your project folder run this as a temp solution: find ./node_modules -type f -print0 | xargs -0 sed -i 's/global\._bitcore/__NULLVARsdfs6d/g' |
** webpack.json
|
So how can one use I need this to read UTXOs and create transactions. |
Hi,
I started a new EC2 instance, and I did a fresh install of node, git and nvm. I set the nvm to 0.12, and I did a sudo npm intsall bitcore and sudo npm install bitcore-explorers, along with a few other modules needed for my script. When I run the script, I get this error:
"Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency."
How can I fix this? Has anyone else run into a similar situation?
I'm using Ubunti 14.04 btw, and the script works fine on my local machine.
Thanks,
Mike
The text was updated successfully, but these errors were encountered: