Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Error: process.stdout cannot be closed #3

Closed
plievone opened this issue Dec 4, 2011 · 3 comments
Closed

Error: process.stdout cannot be closed #3

plievone opened this issue Dec 4, 2011 · 3 comments

Comments

@plievone
Copy link

plievone commented Dec 4, 2011

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>    Name of the global to export [browserbuild]
    -f, --filename <name>  Name of the file to create [browserbuild.js]
    -m, --main <name>      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.<anonymous> (node.js:284:15)
    at Command.<anonymous> (/home/user/browserbuild-test/node_modules/browserbuild/node_modules/commander/lib/commander.js:922:18)
    at Command.emit (events.js:88:20)
    at Object.<anonymous> (/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.

@TooTallNate
Copy link

Note that in node 0.6.x, process.stdout.end() will throw an exception :\

~/ (master) $ cat t.js 
process.stdout.end()

∞ ~/ (master) $ n use 0.4.12 t.js

∞ ~/ (master) $ n use 0.6.4 t.js

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: process.stdout cannot be closed
    at WriteStream.<anonymous> (node.js:284:15)
    at Object.<anonymous> (/Users/nrajlich/node-in-action/t.js:1:78)
    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)

@rauchg
Copy link
Contributor

rauchg commented Mar 20, 2012

/cc @visionmedia

@rauchg rauchg closed this as completed Mar 20, 2012
@tj
Copy link

tj commented Mar 20, 2012

hmm ill take a look i dont remember calling .end()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants