bony
bony

Reputation: 3

When I first run my coffeescript,I got error--

when I execute this command,it is right--

coffee -v

it's output is right.`CoffeeScript version 1.6.1 but when I type

$ coffee

it got error,the log is below

node.js:201
    throw e; // process.nextTick error, or 'error' event on first tick
          ^
TypeError: Object #<Object> has no method 'split'
at Interface.setPrompt (readline.js:121:24)
at new REPLServer (repl.js:128:7)
at Object.start (repl.js:249:14)
at Object.start (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/repl.js:95:23)
at Object.run (/usr/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:76:32)
at Object.<anonymous> (/usr/local/lib/node_modules/coffee-script/bin/coffee:7:41)
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)

I need your help

Upvotes: 0

Views: 475

Answers (1)

loganfsmyth
loganfsmyth

Reputation: 161457

This is a design decision on the part of the CoffeeScript devs.

https://github.com/jashkenas/coffee-script/issues/2813

The CoffeeScript REPL no longer supports Node v0.6. You should be able to compile by passing a file though. If you want it to work, you will either need to use an older version of CoffeeScript, or a newer version of Node.

Upvotes: 2

Related Questions