calxibe / StorjMonitor

Node.js script for publishing data from local Storj nodes to Storjstat.com
15 stars 14 forks source link

Linux support #2

Closed MrTechGadget closed 6 years ago

MrTechGadget commented 6 years ago

Have this working in my linux docker node built with the official instructions for running on Synology nas. Storj Share Daemon on Synology

It worked, my node is now reporting storage space!

All you have to do is delete node_modules and run 'npm install' This fixes #1 as well, I tried to use values you would likely use for name, author and description. Please tweak as you like.

shaltay74 commented 6 years ago

I'm getting a similar error. Storj is started on nas synology from under docker.

node storjMonitor.js

/volume2/storj/storjmonitor/node_modules/bindings/bindings.js:83 throw e ^

Error: /volume2/storj/storjmonitor/node_modules/weak/build/Release/weakref.node: invalid ELF header at Error (native) at Object.Module._extensions..node (module.js:434:18) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at bindings (/volume2/storj/storjmonitor/node_modules/bindings/bindings.js:76:44) at Object. (/volume2/storj/storjmonitor/node_modules/weak/lib/weak.js:7:35) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)

MrTechGadget commented 6 years ago

Try my pull request, add the package.json, then delete the node_modules directory and run npm install to recompile.

Been running great since then. On Tue, Feb 6, 2018 at 12:42 AM shaltay74 notifications@github.com wrote:

I'm getting a similar error. Storj is started on nas synology from under docker. node storjMonitor.js

/volume2/storj/storjmonitor/node_modules/bindings/bindings.js:83 throw e ^

Error: /volume2/storj/storjmonitor/node_modules/weak/build/Release/weakref.node: invalid ELF header at Error (native) at Object.Module._extensions..node (module.js:434:18) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at bindings (/volume2/storj/storjmonitor/node_modules/bindings/bindings.js:76:44) at Object. (/volume2/storj/storjmonitor/node_modules/weak/lib/weak.js:7:35) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/calxibe/StorjMonitor/pull/2#issuecomment-363317104, or mute the thread https://github.com/notifications/unsubscribe-auth/AQVLdTdqvw2o4Umdn0LIPJAmak35yQHOks5tR-ZTgaJpZM4R4VvB .

shaltay74 commented 6 years ago

npm install

npm ERR! install Couldn't read dependencies npm ERR! Linux 3.10.102 npm ERR! argv "/volume1/@appstore/Node.js_v4/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v4.8.4 npm ERR! npm v2.15.11 npm ERR! file /volume2/storj/storjmonitor/package.json npm ERR! code EJSONPARSE

npm ERR! Failed to parse json npm ERR! Unexpected token '<' at 7:1 npm ERR! <!DOCTYPE html> npm ERR! ^ npm ERR! File: /volume2/storj/storjmonitor/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse

npm ERR! Please include the following file with any support request: npm ERR! /volume2/storj/storjmonitor/npm-debug.log

MrTechGadget commented 6 years ago

@shaltay74 Did you run npm install from root as an interactive ssh session in your docker container?

That error doesn’t make sense, the file is valid JSON. Are you sure you didn’t accidentally edit the file?