eztz.rpc.getBalance("tz1ZzQFmd6e2YTUrkggADWUj5c68wsynpkCZ").then(function(res){ ^

TypeError: Cannot read property 'getBalance' of undefined


npm i eztz wont work.

Instead you can add eztz's git repo as a dependency in your package.json

"dependencies": {   
    "eztz": "git://github.com/TezTech/eztz.git#0c6b93ffdd774f7ed3c528058f854deb0649a61c"  

After that you just run npm i or yarn to install the package.

When you want to use the library you have to import it

import { eztz } from 'eztz';

...or use require.

var { eztz } = require('eztz');

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.