SublimeREPL icon indicating copy to clipboard operation
SublimeREPL copied to clipboard

When I started REPL on nodeJs, there were some errors and the program told me that TypeErro

Open jingyuexing opened this issue 6 years ago • 5 comments

readline.js:291 throw new errors.TypeError( ^

TypeError [ERR_INVALID_ARG_TYPE]: The "stringToWrite" argument must be of type string. Received type null at REPLServer._writeToOutput (readline.js:291:11) at REPLServer.Interface.prompt (readline.js:259:10) at REPLServer.displayPrompt (repl.js:740:8) at new REPLServer (repl.js:599:8) at Object.exports.start (repl.js:616:14) at D:\Sublime Text 3157 x64\Data\Packages\SublimeREPL\config\NodeJS\repl.js:5:20 at Object. (D:\Sublime Text 3157 x64\Data\Packages\SublimeREPL\config\NodeJS\repl.js:38:3) at Module._compile (internal/modules/cjs/loader.js:654:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32)

Repl Closed #556 version sublimetext3 os:win10 nodejs:v9.11.1 REPL:2.1.2

jingyuexing avatar Jun 01 '18 01:06 jingyuexing

Repros here on Mac OS 10.14.x, Sublime 3.2.1, SublimeREPL 2.1.2.

ryanpcmcquen avatar Jun 12 '19 22:06 ryanpcmcquen

@wuub, any ideas here?

ryanpcmcquen avatar Jun 12 '19 22:06 ryanpcmcquen

Same/similar problem on Windows 7 OS.

When I try to run a node js file I get:

internal/validators.js:112
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "stringToWrite" argument must be of type string. Received type object
    at validateString (internal/validators.js:112:11)
    at REPLServer._writeToOutput (readline.js:321:3)
    at REPLServer.Interface.prompt (readline.js:290:10)
    at REPLServer.displayPrompt (repl.js:959:8)
    at new REPLServer (repl.js:811:8)
    at Object.exports.start (repl.js:829:16)
    at C:\Users\Lee\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\config\NodeJS\repl.js:5:20
    at Object.<anonymous> (C:\Users\Lee\AppData\Roaming\Sublime Text 3\Packages\SublimeREPL\config\NodeJS\repl.js:38:3)
    at Module._compile (internal/modules/cjs/loader.js:868:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)

***Repl Closed***

leem32 avatar Aug 09 '19 13:08 leem32

See https://github.com/wuub/SublimeREPL/issues/364 for the fix

MattDMo avatar Jan 17 '23 15:01 MattDMo

PR that fixes it: https://github.com/wuub/SublimeREPL/pull/574

ryanpcmcquen avatar Jan 17 '23 16:01 ryanpcmcquen