-
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. #1457
Comments
@Johannbr Same issue for me. I had some struggles trying to install bitcore due to a permission error. Eventually I installed it. I went back and deleted the global and project level installations and bitcore, but still get the same error as above. I also went and manually deleted the bitcore packages from the global npm directory, but no joy. |
Hi,
|
I had the exactly same trouble, and fixed by the exactly same workaround. not sure should I send a PR, though. |
Worked for me too, after spending a day on it :( |
It works, as long as you make the same correction to *all your instances of bitcore-lib/index.js |
Same problem, same solution. |
newer versions are broken, see comments here: ad4e25e |
Same problem here. How did you guys fix it? |
I just opened node_modules/bitcore-mnemoic/node_modules/bitcore-lib/index.js and commented out the following lines of code
|
Beware: bitpay/bitcore#1457 (comment) When using bitcore-explorers and bitcore-lib (this change) the above error witl occur. To fix apply proposed solution directly to every bitcore-lib/index.js file. Keep an eye for bitpay/bitcore-explorers#41
The solution that @Johannbr suggested worked. If you have multiple bitcore libraries you need to return all the bitcore.versionGuard conditions |
try adding |
I have found a full proof solution to this 👍
enjoy !! |
@adiingit are you putting that in the versionguard function? |
@adiingit Great! Any chance you could make a pull request with the change? |
@silence48 : no , not in version gaurd function . Put it as the init of your application or app.js . |
@adiingit thanks I figured it out shortly after appreciate the fix |
@mathiasrw : do we need a PR to bitcore lib for this ? We can add this to our app instead . |
I think I found a very Good work Around with version control or editing the code in your node modules because to me that is a bad practice
Or
|
@dagogodboss what if you don't want to use Bitcore-p2p ? I just want lib and explorers |
Where do I add that line? |
@adiingit's works great 👍 but if you're using
|
fyi, last I looked into these things I found https://bcoin.io as a higher quality bitcoin javascript library |
Resolved |
Hi
I'm trying to install a full node (https://bitcore.io/guides/full-node/), but I ran into 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 depen
Previous environment:
node 6 and npm 3
Steps:
1- npm install -g bitcore
=> got an error
2- sudo npm install -g bitcore
3- sudo apt-get install libzmq3-dev build-essential
Then I read that you should not install it with root privileges
4- Remove npm and node from my system (even cache and tmp folder)
5- install nvm with node 4.8.3 and npm 2.15.11
Current environment:
nvm with node 4.8.3 and npm 2.15.11
Steps:
1- npm install -g bitcore
2- bitcored
=> Error: More than one instance of bitcore-lib found.
I don't know how to make it work. If you have any ideas ;-)
Log:
/home/johann/.nvm/versions/node/v4.8.3/lib/node_modules/bitcore/node_modules/insight-api/node_modules/bitcore-lib/index.js:12
throw new Error(message);
^
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.
at Object.bitcore.versionGuard (/home/johann/.nvm/versions/node/v4.8.3/lib/node_modules/bitcore/node_modules/insight-api/node_modules/bitcore-lib/index.js:12:11)
at Object. (/home/johann/.nvm/versions/node/v4.8.3/lib/node_modules/bitcore/node_modules/insight-api/node_modules/bitcore-lib/index.js:15:9)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/johann/.nvm/versions/node/v4.8.3/lib/node_modules/bitcore/node_modules/insight-api/lib/blocks.js:4:15)
at Module._compile (module.js:409:26)
The text was updated successfully, but these errors were encountered: