bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

bitcore-lib new version error

Open jackyxie opened this issue 9 years ago • 4 comments

bitcore-4.1.0 is find to run, but bitcore-4.1.1 show errors.

/usr/local/src/bitcore-4.1.1/node_modules/insight-api/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 (/usr/local/src/bitcore-4.1.1/node_modules/insight-api/node_modules/bitcore-lib/index.js:12:11) at Object. (/usr/local/src/bitcore-4.1.1/node_modules/insight-api/node_modules/bitcore-lib/index.js:15:9) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (/usr/local/src/bitcore-4.1.1/node_modules/insight-api/lib/blocks.js:4:15) at Module._compile (module.js:409:26)

jackyxie avatar Jun 04 '17 14:06 jackyxie

from /usr/local/src/bitcore-4.1.1 run the following command

find ./node_modules -type f -print0 | xargs -0 sed -i 's/global\._bitcore/__NULLVARsdfs6d/g'

It will disable the version guard.

dabura667 avatar Jun 04 '17 15:06 dabura667

Hello,

I have the same exact issue. I've installed it with npm install -g bitcore. I'd could not run the command above, does it works for Mac too or what should I do to disable the version guard?

cbedoya avatar Jun 06 '17 19:06 cbedoya

@cbedoya have a try find /usr/lib/node_modules -type f -print0 | xargs -0 sed -i 's/global\._bitcore/__NULLVARsdfs6d/g'

jackyxie avatar Jun 07 '17 08:06 jackyxie

run

find ./node_modules -type f -print0 | xargs -0 sed -i 's/global._bitcore/__NULLVARsdfs6d/g'

then run "bitcored" i got "__NULLVARsdfs6d is not defined"

johncloud200 avatar Dec 15 '17 04:12 johncloud200