Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Startup error: io.listen is not a function #28

Open
kpayson opened this issue Feb 7, 2021 · 4 comments
Open

On Startup error: io.listen is not a function #28

kpayson opened this issue Feb 7, 2021 · 4 comments

Comments

@kpayson
Copy link

kpayson commented Feb 7, 2021

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

@nzfarmer1
Copy link

Following

@Enzo-21
Copy link

Enzo-21 commented Mar 27, 2021

Solved it by adding:

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

in the begining of the terminal.js file

@ychdesign
Copy link

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

@tellerincorporated
Copy link

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

please can you explain why this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants