Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'coin-hive-stratum' #150

Open
isaack0815 opened this issue Feb 4, 2018 · 3 comments
Open

Error: Cannot find module 'coin-hive-stratum' #150

isaack0815 opened this issue Feb 4, 2018 · 3 comments

Comments

@isaack0815
Copy link

hay,
when I start the proxy with pm2 I always get the following error:

0|proxy    |     at Object.Module._extensions..js (module.js:654:10)
0|proxy    |     at Module.load (module.js:556:32)
0|proxy    |     at tryModuleLoad (module.js:499:12)
0|proxy    |     at Function.Module._load (module.js:491:3)
0|proxy    | 2018-02-04 13:46: Error: Cannot find module 'coin-hive-stratum'
0|proxy    |     at Function.Module._resolveFilename (module.js:538:15)
0|proxy    |     at Function.Module._load (module.js:468:25)
0|proxy    |     at Module.require (module.js:587:17)
0|proxy    |     at require (internal/module.js:11:18)
0|proxy    |     at Object.<anonymous> (/home/server/proxy.js:1:77)
0|proxy    |     at Module._compile (module.js:643:30)
0|proxy    |     at Object.Module._extensions..js (module.js:654:10)
0|proxy    |     at Module.load (module.js:556:32)
0|proxy    |     at tryModuleLoad (module.js:499:12)
0|proxy    |     at Function.Module._load (module.js:491:3)

but I have coin-hive-stratum with the command
npm i -g pm2 coin-hive-stratum installed.

I can also do the proxy with the command
coin-hive-stratum 8892 - host = pool.supportxmr.com --port = 3333
start.
but not with pm2

an idea of what that may be?

@SiemdeNijs
Copy link

SiemdeNijs commented Feb 5, 2018

I'm having the same problem on CentOS7,
When I run the "coin-hive-stratum 8892 - host = pool.supportxmr.com --port = 3333" command, everything is setup correctly and working fine, but when I try to run "proxy.js" with PM2, the proxy/service doesn't seem to work at all/not online/not listening on ports/not even started, I think.

Following this.
PS: Try to see if the " are correctly placed (at const Proxy = require("coin-hive-stratum"); )

PPS: Be sure to run from the coin-hive-stratum directory, this seems to help too

@jimmy-tfp
Copy link

you might try implementing your proxy as a regular node program, thus:

mkdir proxy
cd proxy/
npm init <-- just use the defaults
npm install --save coin-hive-stratum
vi proxy.js <-- from the wiki
node proxy.js <-- as a test
pm2 start proxy.js --name=proxy --log-date-format="YYYY-MM-DD HH:mm" <-- from the wiki

@d3c0d3d
Copy link

d3c0d3d commented Mar 31, 2018

Run npm install coin-hive-stratum inside the folder where 'script' is.

#76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants