<p>Add this line prior bitcore definition:</p>
<pre><code>Object.defineProperty(global, '_bitcore', { get(){ return undefined }, set(){} })
</code></pre>
<p>Taken from <a href="https://github.com/bitpay/bitcore/issues/1457#issuecomment-467594031" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2024-07-23T11:29:41.783Z
You saved my life. Thanks
Yahya Aghdam
CC BY-SA 4.0
2022-01-14T13:45:42.457Z
2024-08-21T15:12:41.977Z
2024-08-21T15:12:41.977Z
forhas
<p>I don't know if that's the right method but it does work.</p>

<pre><code>delete global._bitcore
var bitcore = require('bitcore-lib')
</code></pre>

CC BY-SA 3.0
2017-09-20T06:33:44.237Z
Is it the right way to do..? and it'll not stop bitcore-lib right..?
Codebrekers
CC BY-SA 3.0
2017-02-12T06:49:54.763Z
2017-02-12T06:49:54.763Z
01BTC10
<p>These two lines (and nothing more), create an error:</p>

<pre><code>var exp = require('bitcore-explorers');
var btc = require('bitcore-lib');

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.
</code></pre>

<p>I could see that this issue has been documented <a href="https://github.com/bitpay/bitcore/issues/1366" rel="nofollow">here</a>, as well as <a href="https://github.com/bitpay/bitcore-payment-protocol/issues/30" rel="nofollow">here</a>, and <a href="https://forum.bitcore.io/t/more-than-one-instance-of-bitcore-lib-found/699" rel="nofollow">here</a>. I read these pages, but I am still unable to overcome the issue. </p>

<p>Can someone please help? How do you do when trying to import different modules of <code>bitcore</code>?</p>

CC BY-SA 3.0
2016-09-15T10:00:16.260Z
Any news on this problem? According to other threads it seems rather intractable. Did you find a workaround?
Mundi
CC BY-SA 3.0
2016-10-03T09:10:18.687Z
I have not found a solution to that unfortunately.
hartmut
<website-integration><bitcore><dependencies>
Bitcore = "Error: More than one instance of bitcore-lib found"
hartmut
# Bitcore = "Error: More than one instance of bitcore-lib found"

(Asked by: username_0 on 2016-07-30)

These two lines (and nothing more), create an error:
var exp = require('bitcore-explorers');
var btc = require('bitcore-lib');

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.

I could see that this issue has been documented here, as well as here, and here. I read these pages, but I am still unable to overcome the issue. 
Can someone please help? How do you do when trying to import different modules of bitcore?

**Tags:** website-integration, bitcore, dependencies

> **Comments:**
> **username_1**: Any news on this problem? According to other threads it seems rather intractable. Did you find a workaround?  
> **username_0**: I have not found a solution to that unfortunately.  

---

## 2 answers

### Answer by username_2 on 2022-01-14. Score: 3

Add this line prior bitcore definition:
Object.defineProperty(global, '_bitcore', { get(){ return undefined }, set(){} })

Taken from here.

> **Comments:**
> **username_3**: You saved my life. Thanks  

---

### Answer by username_4 on 2017-02-12. Score: 2

I don't know if that's the right method but it does work.
delete global._bitcore
var bitcore = require('bitcore-lib')

> **Comments:**
> **username_5**: Is it the right way to do..? and it'll not stop bitcore-lib right..?  

---

