I've installed bitcore.io on a folder for my nodejs, using the npm command.

npm install bitcore
npm install classtool

Of course, I tried to run an example code, the one is shown at their website. I saved it as "test.js"

var Address = require('bitcore/Address').class();

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

try {
    console.log("Address is valid.");
} catch(e) {
    console.log(addr.data + " is not a valid address. " + e);

Then I did:

myuser@ownbox:~/bitproj$ node test.js
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa is not a valid address. RangeError: start > end

Is there something I'm missing? I've been googling for hours, for a solution. The address indeed does exist, I've checked it with blockchain.info.


I had nodejs outdated. My version was "v0.9.9" when the latest is (right now) "v0.10.26", and that was all the issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.