This repository was archived by the owner on Apr 3, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This guard is making it impossible for developers to use this library without various hacks. I've seen a few complaints about it as well as hacky solutions to bypass it.
https://github.com/bitpay/bitcore-lib/search?q=versionGuard&type=Issues&utf8=✓
https://stackoverflow.com/questions/46315459/bitcore-more-than-one-instance-of-bitcore-lib-found
https://forum.bitcore.io/t/more-than-one-instance-of-bitcore-lib-found/699
https://stackoverflow.com/questions/45217988/error-more-than-one-instance-of-library-found
https://bitcoin.stackexchange.com/questions/46795/bitcore-error-more-than-one-instance-of-bitcore-lib-found
https://stackoverflow.com/questions/47010584/nodejs-eth-lightwallet-doesnt-allow-different-bitcore-lib-versions-among-submod
https://forum.bitcore.io/t/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/1612
Some of these issues were even marked as high priority, before being closed with the resolution as a hacky solution:
bitpay/bitcore#1454
bitpay/bitcore#1484
bitpay/bitcore#1328
bitpay/bitcore#1366
bitpay/bitcore#1486
bitpay/bitcore#1453
bitpay/bitcore#1454
bitpay/bitcore#1457
bitpay/bitcore#1232
bitpay/bitcore#1303
bitpay/bitcore#1144
#153
#67
bitpay/bitcore#1366
bitpay/bitcore#1232
bitpay/bitcore#1457
bitpay/bitcore-mnemonic#26
bitpay/bitcore-mnemonic#58
bitpay/i-made-this#15
bitpay/bitcore-wallet-service#643
People are just using
delete global._bitcore
or other hacks so this code is doing more harm than good.