weifund / weifund-dapp-basic

An implementation of WeiFund that uses little to no JS frameworks (for prototyping, and demonstration purposes).
16 stars 6 forks source link

More than one instance of bitcore-lib found. Please make sure to... #45

Open stefek99 opened 7 years ago

stefek99 commented 7 years ago
Uncaught 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 (index.js:12)
    at Object.<anonymous> (index.js:15)
    at Object.106../lib/address (index.js:70)
    at s (_prelude.js:1)
    at _prelude.js:1
    at Object.<anonymous> (mnemonic.js:3)
    at Object.97../errors (mnemonic.js:298)
    at s (_prelude.js:1)
    at _prelude.js:1
    at Object.95../lib/mnemonic (index.js:1)

https://github.com/bitpay/bitcore-wallet-service/issues/643 https://github.com/bitpay/bitcore/issues/1457 https://github.com/bitpay/bitcore/issues/1366 https://github.com/bitpay/bitcore/issues/1454

Here is something like look like a hacky solution: https://github.com/bitpay/bitcore/issues/1454#issuecomment-306900782

If you have capacity - maybe you'll find a better way to fix.

usab commented 6 years ago

I have the same problem. How to fix this?

neohq commented 6 years ago

You have another package that has "bitcore-lib" as submodule, I've found it inside "bitcore-node" and "bitcore".

Uninstall the "bitcore-lib" and use the one inside the other packages like this :

let bitcoreLib = require('bitcore-node/node_modules/bitcore-lib')