ergoplatform / ergo-js

JS library for Ergo integration
MIT License
17 stars 3 forks source link

ReferenceError: window is not defined #46

Open chpan opened 2 years ago

chpan commented 2 years ago

use step detail:

1:npm install @ergoplatform/ergo-js

test code:

`const ergo = require('@ergoplatform/ergo-js');

async function TestERG() { //const currentHeight = ergo.getCurrentHeight() //console.log("currentHeight", currentHeight)

}

TestERG()

[bitforex@localhost erg]$ cat test.js const ergo = require('@ergoplatform/ergo-js');

async function TestERG() { const currentHeight = ergo.getCurrentHeight() console.log("currentHeight", currentHeight) }

TestERG()`

2: node test.js image

lemmon-714 commented 2 years ago

seconded