LearnBoost/browserbuild — Issue #3: Error: process.stdout cannot be closed
Author: plievone
Created: 2011-12-04 00:02:42+00:00
State: open

Is there something wrong with my setup? Just a minor inconvenience with browserbuild 0.1.0 from npm, on node v0.6.4:

```
$ ./bin/browserbuild

Usage: browserbuild [options]

Options:

-h, --help output usage information
-V, --version output the version number
-g, --global Name of the global to export [browserbuild]
-f, --filename Name of the file to create [browserbuild.js]
-m, --main Name of the main module to export (auto)
-s, --skip-parse Avoid parsing meta-blocks

Examples:

$ browserbuild dir/
$ browserbuild -g test file.js

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: process.stdout cannot be closed
at WriteStream. (node.js:284:15)
at Command. (/home/user/browserbuild-test/node_modules/browserbuild/node_modules/commander/lib/commander.js:922:18)
at Command.emit (events.js:88:20)
at Object. (/home/user/browserbuild-test/node_modules/browserbuild/bin/browserbuild:38:11)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
```

Same error happens with `./bin/browserbuild -h` but not with `./bin/browserbuild -V`.

And if the file is not found, node throws `Error: ENOENT, no such file or directory`. Perhaps there is a nicer way.