cryptonote-nodejs-pool icon indicating copy to clipboard operation
cryptonote-nodejs-pool copied to clipboard

node init.js

Open Sarahshohani opened this issue 4 years ago • 26 comments

I have get this error while performing node init.js could you please help? uname -a: Linux vmi677535.contaboserver.net 4.15.0-134-generic #138-Ubuntu SMP Fri Jan 15 10:52:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I have installed node 11 ,14,16 but none of them worked I have also tried nvm but didn't worked for me.

/root/pool/node_modules/dateformat/lib/dateformat.js:1 var token=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]"|'[^']'/g;var timezone=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g;var timezoneClip=/[^-+\dA-Z]/g;export default function dateFormat(date,mask,utc,gmt){if(arguments.length===1&&typeof date==="string"&&!/\d/.test(date)){mask=date;date=undefined}date=date||date===0?date:new Date;if(!(date instanceof Date)){date=new Date(date)}if(isNaN(date)){throw TypeError("Invalid date")}mask=String(masks[mask]||mask||masks["default"]);var maskSlice=mask.slice(0,4);if(maskSlice==="UTC:"||maskSlice==="GMT:"){mask=mask.slice(4);utc=true;if(maskSlice==="GMT:"){gmt=true}}var _=function _(){return utc?"getUTC":"get"};var _d=function d(){return date_()+"Date"};var D=function D(){return date_()+"Day"};var m=function m(){return date_()+"Month"};var y=function y(){return date[()+"Full

SyntaxError: Unexpected token export at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/root/pool/lib/logger.js:11:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32)

Sarahshohani avatar Sep 30 '21 04:09 Sarahshohani

Use node v11.15.0, I had the same problem.

Stardock2018 avatar Oct 14 '21 19:10 Stardock2018

Stardock2018 I used node v11.15.0 as you suggested but doesn't work, can you show your miner working, please

dagwood-Fenichuck avatar Oct 16 '21 17:10 dagwood-Fenichuck

Graft.westcoastxmr.ca

On Sat., Oct. 16, 2021, 11:12 a.m. dagwood-Fenichuck, < @.***> wrote:

Stardock2018 I used node v11.15.0 as you suggested but doesn't work, can you show your miner working, please

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dvandal/cryptonote-nodejs-pool/issues/692#issuecomment-944957739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAIPFRXYBJLW7PE75ZXDRLUHGXBVANCNFSM5FBMMCMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Stardock2018 avatar Oct 16 '21 17:10 Stardock2018

Hi thanks for that shows great my site shows like this but just can't get buildl to run with the date format problem will try installing everything for the tenth time

dagwood-Fenichuck avatar Oct 16 '21 18:10 dagwood-Fenichuck

What Ubuntu version are you using?

On Sat., Oct. 16, 2021, 12:17 p.m. dagwood-Fenichuck, < @.***> wrote:

Hi thanks for that shows great my site shows like this but just can't get buildl to run with the date format problem will try installing everything for the tenth time

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dvandal/cryptonote-nodejs-pool/issues/692#issuecomment-944973829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJAIPFXQNCH2OXPBPVA3NVDUHG6TZANCNFSM5FBMMCMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Stardock2018 avatar Oct 16 '21 19:10 Stardock2018

ubuntu 18.04 bionic

dagwood-Fenichuck avatar Oct 16 '21 19:10 dagwood-Fenichuck

did you install all the deps. ?

Stardock2018 avatar Oct 18 '21 13:10 Stardock2018

anyone knows how to fix it ? i have some error on 18

maletazul avatar Oct 18 '21 21:10 maletazul

Installed everything in package.json plus two peer dependencies build says were missing, do you have a screenshot of the console running the pool at the end when you node init.js

dagwood-Fenichuck avatar Oct 19 '21 12:10 dagwood-Fenichuck

Installed everything in package.json plus two peer dependencies build says were missing, do you have a screenshot of the console running the pool at the end when you node init.js

sure, here he is: ubuntu 18 node --version v11.15.0

[email protected] [email protected]

node init.js /home/luissilva/pool/node_modules/dateformat/lib/dateformat.js:26 export default function dateFormat (date, mask, utc, gmt) { ^^^^^^

SyntaxError: Unexpected token export at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/home/luissilva/pool/lib/logger.js:11:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32)

or

/home/luissilva/pool/node_modules/dateformat/lib/dateformat.js:1 var token=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]"|'[^']'/g;var timezone=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g;var timezoneClip=/[^-+\dA-Z]/g;export default function dateFormat(date,mask,utc,gmt){if(arguments.length===1&&typeof date==="string"&&!/\d/.test(date)){mask=date;date=undefined}date=date||date===0?date:new Date;if(!(date instanceof Date)){date=new Date(date)}if(isNaN(date)){throw TypeError("Invalid date")}mask=String(masks[mask]||mask||masks["default"]);var maskSlice=mask.slice(0,4);if(maskSlice==="UTC:"||maskSlice==="GMT:"){mask=mask.slice(4);utc=true;if(maskSlice==="GMT:"){gmt=true}}var _=function _(){return utc?"getUTC":"get"};var _d=function d(){return date_()+"Date"};var D=function D(){return date_()+"Day"};var _m=function m(){return date_()+"Month"};var y=function y(){return date

SyntaxError: Unexpected token export at Module._compile (internal/modules/cjs/loader.js:760:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32) at Function.Module._load (internal/modules/cjs/loader.js:620:12) at Module.require (internal/modules/cjs/loader.js:723:19) at require (internal/modules/cjs/helpers.js:14:16) at Object. (/home/luissilva/pool/lib/logger.js:11:18) at Module._compile (internal/modules/cjs/loader.js:816:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10) at Module.load (internal/modules/cjs/loader.js:685:32)

maletazul avatar Oct 19 '21 12:10 maletazul

Stardock2018 do you have a screenshot of the miner running after you node init.js sir

dagwood-Fenichuck avatar Oct 19 '21 13:10 dagwood-Fenichuck

Stardock2018 do you have a screenshot of the miner running after you node init.js sir

The pool even start for miner connections, its a fresh install. is that you are asking?

maletazul avatar Oct 19 '21 13:10 maletazul

Yes if you can i can't get the miner connection to start

dagwood-Fenichuck avatar Oct 19 '21 13:10 dagwood-Fenichuck

Yes if you can i can't get the miner connection to start

Like me

maletazul avatar Oct 19 '21 13:10 maletazul

Hi, thank you for your answer did you exactly used these structures? and did you exactly used git clone https://github.com/dvandal/cryptonote-nodejs-pool.git pool

Sarahshohani avatar Oct 22 '21 09:10 Sarahshohani

yes followed all instructions https://github.com/dvandal/cryptonote-nodejs-pool.git pool, but still gives dateformat error, I added ESM module, type: module to package.json changed dateformat.js to cjs and require to import and now get config undefined dont know where to go from here can anyone install this?

dagwood-Fenichuck avatar Oct 22 '21 15:10 dagwood-Fenichuck

Had the same issue yesterday. Found out the npm dateformat package has some recent updates that results in the above error. For me, changing the "dateformat": "*" to "dateformat": "4.5.1" in package.json, and run npm update again, fixed the issue.

TheReal420BlazeIt avatar Oct 22 '21 18:10 TheReal420BlazeIt

Thank you , I did what you said about the dateformat and the node init.js command had worked thank you for your answer but there is just one problem that my site won't load? www.blackberrygojiberry.com

Sarahshohani avatar Oct 23 '21 12:10 Sarahshohani

That is probably because of your config.json & the website's config.js. In the pool's config.json, under the api section, you need to bind to your ip address. Leaving it on 0.0.0.0 won't work. I also had some issues when using 127.0.0.1, so use your local ip address of the server. After that, set the same ip address in the website's config.js behind the api variable.

TheReal420BlazeIt avatar Oct 23 '21 14:10 TheReal420BlazeIt

Thank you , I have changed my bind IP to my public ip address and even 127.0.0.1 but none of them didn't work I've also tried to remove my ssl to see if that has problem but it didn't work too

Sarahshohani avatar Oct 24 '21 11:10 Sarahshohani

could you please send me your config files

Sarahshohani avatar Oct 24 '21 11:10 Sarahshohani

Looks like your website's config.js is wrong. I see you use var api = "blackberrygojiberry.com:8117"; but that should be var api = "http://blackberrygojiberry.com:8117";. You have to place http or https in front of it. In your case http.

TheReal420BlazeIt avatar Oct 24 '21 22:10 TheReal420BlazeIt

Thank you it worked for me.

Sarahshohani avatar Oct 26 '21 12:10 Sarahshohani

Thank you guys now running. have turtlecoin node in /home/user/ and pool in /var/www/pool can't connect to node daemon with pool on 127.0.0.1 or 0.0.0.0 have used my domain.com using nginx with reverse proxy. you can see its working. error from daemon 2021-11-11 02:15:34 [api] Error getting last block data {"errno":"ECONNRESET","code":"ECONNRESET","syscall":"read"} 2021-11-11 02:15:34 [api] Stat collection finished: 1 ms redis, 25 ms daemon

API started & listening on 0.0.0.0 port 8117 2021-11-11 02:15:09 [pool] (Thread 1) Clear values for connected workers in redis database. (node:15224) ExperimentalWarning: queueMicrotask() is experimental. 2021-11-11 02:15:09 [pool] (Thread 3) Clear values for port 3333 in redis database. 2021-11-11 02:15:09 [pool] (Thread 3) Started server listening on port 3333 2021-11-11 02:15:09 [pool] (Thread 3) Clear values for port 4444 in redis database. 2021-11-11 02:15:09 [pool] (Thread 3) Started server listening on port 4444 2021-11-11 02:15:09 [pool] (Thread 3) Clear values for port 5555 in redis database. 2021-11-11 02:15:09 [pool] (Thread 3) Started server listening on port 5555

So it's not connecting to daemon someone tell me how to connect to this turtlecoin daemon please

dagwood-Fenichuck avatar Nov 11 '21 12:11 dagwood-Fenichuck

Had the same issue yesterday. Found out the npm dateformat package has some recent updates that results in the above error. For me, changing the "dateformat": "*" to "dateformat": "4.5.1" in package.json, and run npm update again, fixed the issue.

Works to solve the original error!

88plug avatar Mar 15 '22 06:03 88plug

:~/pool$ node init.js 2023-10-06 22:08:09 [master] Starting Cryptonote Node.JS pool version v2.0.0 (node:10999) UnhandledPromiseRejectionWarning: Error: The client is closed ubuntu 20

domajor avatar Oct 06 '23 22:10 domajor