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

Problem starting monitor-dashboard #18

Open
benjamincochran opened this issue Dec 26, 2014 · 5 comments
Open

Problem starting monitor-dashboard #18

benjamincochran opened this issue Dec 26, 2014 · 5 comments

Comments

@benjamincochran
Copy link

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 [email protected] No README data
npm WARN engine [email protected]: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"0.10.32","npm":"2.1.2"})
[email protected] node_modules/monitor-dashboard
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected]

... 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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@sandarovich
Copy link

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 [email protected]
3 info using [email protected]
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
Copy link
Owner

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.

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

3 participants