eztz.rpc.getBalance("tz1ZzQFmd6e2YTUrkggADWUj5c68wsynpkCZ").then(function(res){ ^
TypeError: Cannot read property 'getBalance' of undefined
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.
Sign up to join this communitynpm 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');