johnpapa / ng-demos

variety of angular demos
MIT License
1.7k stars 961 forks source link

Problem with gulp task "serve-dev-debug" in modular demo #32

Closed kokujin closed 9 years ago

kokujin commented 10 years ago

Trying to use this task emits an error

[gulp] [nodemon] starting `node --debug=5858 ./src/server/app.js`

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Command failed: /bin/sh: 1: node-inspector: not found

    at ChildProcess.exithandler (child_process.js:648:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:117:20)
    at Pipe.close (net.js:465:12)
wardbell commented 10 years ago

The task assumes you've installed node-inspector globally. See https://github.com/node-inspector/node-inspector

johnpapa commented 10 years ago

can you make a PR to add it to the package.json?

wardbell commented 10 years ago

I don't think it should be part of the package. The expectation is that node-inspector is installed GLOBALLY ... like gulp itself. Perhaps you feel differently now but at the moment there is an assumption that tools are installed globally.

Perhaps the README should list prerequisites?

kokujin commented 10 years ago

Why should someone expect that node-inspector is installed? Everything else is automatically installed and configured, following your argument would mean to remove all other dev-dependencies to be consistent.Then at least a try/catch wrapping the require that would warn the user to install the missing lib would have been user friendlier.

I really am enjoying all the demos, this easy to fix problem just mars the user experience.

wardbell commented 10 years ago

The other dependences are modules installed locally, not tools installed globally. That's a big difference.

I am not opposed to anything that improves the dev's experience.