ergo-js
ergo-js copied to clipboard
ReferenceError: window is not defined
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

seconded