bitcore-node icon indicating copy to clipboard operation
bitcore-node copied to clipboard

Get error when starting bitcore-node with --config option

Open ra2637 opened this issue 9 years ago • 0 comments

Hello everyone, I am trying to use bitcore-node and insight-api service in a newly installed ubuntu-15.10 with nodejs v4.2.3. I followed all the steps in insight-api(https://github.com/bitpay/insight-api), which worked well.
But if I tried to start the node out of the folder with config option, it will show me error msg.

# npm install -g bitcore-node@latest
# bitcore-node create mynode
# cd mynode
# bitcore-node install insight-api
# cd ..
# bitcore-node start --config mynode
/home/explorer/mynode/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/explorer/mynode/node_modules/bitcore-lib/index.js:12:11)
    at Object. (/home/explorer/mynode/node_modules/bitcore-lib/index.js:15:9)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object. (/home/explorer/mynode/node_modules/insight-api/lib/blocks.js:5:15)
    at Module._compile (module.js:435:26)

Not sure if this is the same problem with this issue in https://github.com/bitpay/bitcore/issues/1366 , or just the config option doesn't work well in bitcore-node.

Thanks!

ra2637 avatar Dec 17 '15 06:12 ra2637