web-terminal icon indicating copy to clipboard operation
web-terminal copied to clipboard

On Startup error: io.listen is not a function

Open kpayson opened this issue 5 years ago • 4 comments

web-terminal --port 8088 Web-Terminal running at http://localhost:8088/terminal /usr/local/lib/node_modules/web-terminal/lib/terminal.js:155 io = io.listen(server, { log: false }); ^

TypeError: io.listen is not a function at initialize (/usr/local/lib/node_modules/web-terminal/lib/terminal.js:155:13) at Object. (/usr/local/lib/node_modules/web-terminal/bin/run.js:28:1) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47

kpayson avatar Feb 07 '21 13:02 kpayson

Following

nzfarmer1 avatar Mar 16 '21 23:03 nzfarmer1

Solved it by adding:

let protocol = "http"; http = require(protocol); let server = http.createServer();

in the begining of the terminal.js file

Enzo-21 avatar Mar 27 '21 03:03 Enzo-21

io = io.listen(server, { log: false }); => io = io(server, { log: false });

ychdesign avatar Jul 22 '21 10:07 ychdesign

io = io.listen(server, { log: false }); => io = io(server, { log: false });

please can you explain why this works

tellerincorporated avatar Oct 07 '22 19:10 tellerincorporated