bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

More than one instance of bitcore-lib found.

Open haydencarlson opened this issue 9 years ago • 15 comments

Upon npm installing my project which depends on bitcore-mnemonic and bitcore-payment-protocol both also get bitcore-lib installed into both. This is causing an error `more than on instance of bitcore-lib found check submodules folder for duplicates.

https://gyazo.com/8b26aee53b6b478fa8e770e9d444b04b

haydencarlson avatar Mar 29 '17 23:03 haydencarlson

Use a more recent version of node and then delete your node modules folder and do npm install again.

It really helps.

dabura667 avatar Mar 30 '17 16:03 dabura667

I'm running version 6.2.1 and deleted node modules and npm installed.

haydencarlson avatar Mar 30 '17 17:03 haydencarlson

Same problem as well, using Node 7.10.0 with NPM 4.2.0. The problem is the dependencies using different versions of bitcore-lib. I have tried manually installing the latest version of bitcore-lib in these dependencies, but then the modules within the dependencies that depend on bitcore-lib are then broken due to changes in bitcore-lib (?).

Right now, the install guide for creating a full node is fundamentally broken because bitcoin-wallet-service and bitcoin-wallet-client use bitcore-lib 0.14.0, bitcore-node uses bitcore-lib 0.13.13, and Bitcore uses bitcore-lib 0.13.19.

cconley717 avatar May 16 '17 20:05 cconley717

I made a symbolic link to 0.14.0 for all instances it was used. It works now but it sucks.

haydencarlson avatar May 16 '17 22:05 haydencarlson

Thanks, that worked. Everything is working like normal now. Mah gawd.....

cconley717 avatar May 17 '17 00:05 cconley717

btw, the event that version guard is trying to prevent is no longer a problem in recent versions of node.

If two dependencies require two different versions of bitcore, the requires in each dependency will load the correct version.

I just added a startup script to find bitcore-lib folders and replace "global._bitcore" with __null

dabura667 avatar May 17 '17 00:05 dabura667

Exactly what did you do? I need some hand-holding here - I'm not that familiar with nvm and node.

vetler avatar May 18 '17 18:05 vetler

It looks like they updated the bitpay/bitcore repo to use the latest version of bitcore-lib. Try deleting everything and try again.

cconley717 avatar May 18 '17 19:05 cconley717

Awesome . Yep I tried a fresh copy now and it's working. Thx @kleetus

haydencarlson avatar May 18 '17 20:05 haydencarlson

This issue is happening again...

churchofthought avatar Jun 08 '17 03:06 churchofthought

@xibxor did you try to create a link like i suggested to before?

haydencarlson avatar Jun 13 '17 05:06 haydencarlson

No, I just installed an older version of bitcore using the @ operator for npm.

churchofthought avatar Jun 13 '17 08:06 churchofthought

how to fix?

johncloud200 avatar Dec 13 '17 16:12 johncloud200

This also worked for me npm uninstall --prefix /path/to/your/bws -S bitcore-lib

@jeshan creds.

haydencarlson avatar Dec 13 '17 18:12 haydencarlson

@haydencarlson isn't that can break bws functionality?

johncloud200 avatar Dec 15 '17 07:12 johncloud200