cazala / coin-hive

CoinHive cryptocurrency miner for node.js
https://www.npmjs.com/package/coin-hive
MIT License
1.99k stars 399 forks source link

TypeError: window.init is not a function with CLI #23

Closed nicholasmeyers closed 7 years ago

nicholasmeyers commented 7 years ago

just installed and receive the following error when trying to run the CLI

Initializing...
An error occured Evaluation failed: TypeError: window.init is not a function
    at <anonymous>:1:43
    at <anonymous>:1:78
cazala commented 7 years ago

Looks like the server wasn't able to serve the page where the miner and bindings are available... This might be because the port on which the page is served by default (3002) was taken. You can try launching the server in a different port using the port property in the constructorOptions:

const miner = await CoinHive('<site-key>', { port: 3003 });

Or via environment variables, like COINHIVE_PORT=3003 coinhive <site-key>

Jefreesujit commented 6 years ago

I tried giving a different port, but the issue still persists

ger619 commented 5 years ago

How was this issues resolved?

mirotvorez5 commented 5 years ago

Благодарю за письмо.Иван