small medium large xlarge

Back to: All Forums  CoffeeScript
24 Jul 2011, 20:13
Adam schwabacher (1 post)

Hi, I’m not sure if this should be posted here or in another forum… My apologies if this is the wrong place as I am a new to this environment. I’m trying to get the example to run using the TextMate Bundle but I get the error below. I believe I have the environment variables of PATH and NODE_PATH set properly.

Error: Cannot resume() closed Socket. at Socket.resume (net.js:770:11) at EventEmitter.openStdin (node.js:192:21) at Object. (.:3:19) at Object. (.:55:4) at Module._compile (module.js:402:26) at (/usr/lib/node_modules/coffee-script/lib/coffee-script.js:62:19) at /usr/lib/node_modules/coffee-script/lib/command.js:120:29 at Socket. (/usr/lib/node_modules/coffee-script/lib/command.js:154:14) at Socket.emit (events.js:61:17) at Socket._onReadable (net.js:658:51)

25 Jul 2011, 23:55
Trevor Burnham (53 posts)

That’s actually the output you should be getting if you try to run that code within TextMate. The reason is that CoffeeScript runs code in a non-interactive environment—there’s stdout, but no stdin. As a result, Node throws an error when you try to get user input. Try running from Terminal instead (“coffee”).

27 Jul 2011, 23:03
Anthony Knape (1 post)


Here is a new variation. I run console.log do -> ‘Hello, functions!’ using CMD-R in TextMate.

And I get an error Build with Xcode Build Failed


anthony knape

01 Aug 2011, 15:02
Trevor Burnham (53 posts)

If you get that error, it’s probably because you aren’t in CoffeeScript editing mode. At the bottom of the TextMate window, click the current language (e.g. “Plain Text”) and change it to “CoffeeScript.” If you save a file as .coffee, or open an existing .coffee file, then this should happen automatically.

You must be logged in to comment