wuub / SublimeREPL

SublimeREPL - run an interpreter inside ST2 (Clojure, CoffeeScript, F#, Groovy, Haskell, Lua, MozRepl, NodeJS, Python, R, Ruby, Scala, shell or configure one yourself)
https://github.com/wuub/SublimeREPL
Other
2.14k stars 312 forks source link

Node Repl not working #415

Open ajaykgp opened 9 years ago

ajaykgp commented 9 years ago

I am using Sublime Text 3 and trying to launch Node REPL by using the option

Tools -> SublimeREPL -> Node

results in opening a file displaying

***Repl Closed***

How do I fix this issue? Please, help.

RANUX commented 9 years ago

Same issue.

readline.js:220
    throw new TypeError('stringToWrite must be a string');
          ^
TypeError: stringToWrite must be a string
    at REPLServer._writeToOutput (readline.js:220:11)
    at REPLServer.Interface.prompt (readline.js:188:10)
    at REPLServer.displayPrompt (repl.js:400:8)
    at new REPLServer (repl.js:330:8)
    at Object.exports.start (repl.js:339:14)
    at /Users/xxx/Library/Application Support/Sublime Text 3/Packages/SublimeREPL/config/NodeJS/repl.js:5:20
    at Object.<anonymous> (/Users/xxx/Library/Application Support/Sublime Text 3/Packages/SublimeREPL/config/NodeJS/repl.js:38:3)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

***Repl Closed***
dwdreisigmeyer commented 9 years ago

Comment out the line

prompt: null, //'> ',

in config/NodeJS/repl.js

jkbellew commented 9 years ago

Node REPL works now.

aronayne commented 8 years ago

This post was a help for me but just to point out something that did not occur to me right away.

The path of the config file is contained in the message. So in previous comment posted by @RANUX the path to repl.js is "/Users/xxx/Library/Application Support/Sublime Text 3/Packages/SublimeREPL/config/NodeJS/" , remove from repl.js : prompt: null, //'> ',

iamandrewluca commented 7 years ago

Better change

        prompt:    "null", //'> ',

to

        prompt:    "> ", //'> ',

there you set your prompt start character