lorenwest / monitor-dashboard

Dashboards for the Node.js monitor project
https://lorenwest.github.com/monitor-dashboard
MIT License
204 stars 28 forks source link

Problem starting monitor-dashboard #18

Open benjamincochran opened 9 years ago

benjamincochran commented 9 years ago

I've added monitor to my app file:

bc-comp:myproject-node benjamincochran$ cat app.js
"use strict";
[snip]
// monitoring
require('monitor').start();
[etc]

... and that seems to be working correctly, in that I can connect from the REPL:

bc-comp:myproject-node benjamincochran$ node
> var Monitor = require('monitor');
undefined
> var processMonitor = new Monitor({probeClass:'Process'});
undefined
> processMonitor.connect();
undefined
> processMonitor.get('freemem');
31395840
> processMonitor.get('freemem');
31346688

I've also installed monitor-dashboard, which seems to have worked, but with warnings:

bc-comp:myproject-node benjamincochran$ npm install monitor-dashboard
npm WARN package.json myproject-node@0.0.7 No README data
npm WARN engine connect@1.7.3: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"0.10.32","npm":"2.1.2"})
monitor-dashboard@0.6.7 node_modules/monitor-dashboard
├── config@0.4.37
├── connect@1.7.3 (mime@1.2.11, qs@2.3.3)
├── backbone-callbacks@0.1.7 (backbone@0.9.10, underscore@1.4.4)
└── core-monitor@0.6.3

... but when I try to actually start it up, I get nuthin', zilch, nada:

bc-mycomp:myproject-node benjamincochran$ npm start monitor-dashboard
bc-mycomp:myproject-node benjamincochran$ 

What have I done wrong? I'm on OSX, 10.9.2.

lorenwest commented 9 years ago

Not sure why it's not starting for you. Try this:

1) cd to node_modules/monitor-dashboard 2) run node monitor.js

That's essentially what npm start monitor-dashboard does. Maybe there'll be better debugging information about what went wrong.

benjamincochran commented 9 years ago

That works. I can even run it from the local directory:

bc-comp:myproject-node benjamincochran$ node node_modules/monitor-dashboard/monitor.js 

             _________                                  __________
___________________  /____      _______ ___________________(_)_  /______________
__  __ \  __ \  __  /_  _ \     __  __ `__ \  __ \_  __ \_  /_  __/  __ \_  ___/
_  / / / /_/ / /_/ / /  __/     _  / / / / / /_/ /  / / /  / / /_ / /_/ /  /
/_/ /_/\____/\__,_/  \___/      /_/ /_/ /_/\____//_/ /_//_/  \__/ \____//_/

Problem parsing /Users/benjamincochran/myproject-node/node_modules/.DS_Store/package.json
Problem parsing /Users/benjamincochran/node_modules/.DS_Store/package.json
Now showing at http://localhost:4200/

External connections disabled.
See /Users/benjamincochran/myproject-node/config/external.js for more information.

Very strange.

lorenwest commented 9 years ago

strange. is there an npm error file output in your local directory when you run npm start monitor-dashboard ?

sandarovich commented 9 years ago

Hi. I have faced with the same problem with launching tool on Windows :

npm start monitor-dashboard

Output:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start', 1 verbose cli 'monitor-dashboard' ] 2 info using npm@2.5.1 3 info using node@v0.12.0 4 verbose node symlink C:\Program Files\nodejs\node.exe 5 verbose stack Error: missing script: start 5 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:138:19) 5 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:81:5 5 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:51:40 5 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:349:17) 5 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:126:33) 5 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:316:48 5 verbose stack at evalmachine.:265:20 5 verbose stack at OpenReq.Req.done (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:141:5) 5 verbose stack at OpenReq.done (C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:61:22) 5 verbose stack at FSReqWrap.oncomplete (evalmachine.:99:15) 6 verbose cwd D:\node\QR_try 7 error Windows_NT 5.2.3790 8 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" "monitor-dashboard" 9 error node v0.12.0 10 error npm v2.5.1 11 error missing script: start 12 error If you need help, you may report this error at: 12 error http://github.com/npm/npm/issues

13 verbose exit [ 1, true ]

Running from directory ..\node_modules\monitor-dashboard -> successfully

lorenwest commented 9 years ago

This sounds like a difference in npm start behavior, either a windows difference or an npm version difference. It seems to say it's missing the start script, but if you examine the package.json it should be there.