mthenw / frontail

📝 streaming logs to the browser. Sponsored by https://cloudash.dev
https://cloudash.dev
MIT License
1.8k stars 251 forks source link

TypeError: SocketIO is not a constructor #244

Open janilahti opened 2 years ago

janilahti commented 2 years ago

Released v4.9.2 binary frontail-linux only gives an error when started on Ubuntu 20.04.

$ logging-executable-with-stdout | ./frontail-linux -
pkg/prelude/bootstrap.js:1244
      throw error;
      ^

TypeError: SocketIO is not a constructor
    at Object.<anonymous> (/snapshot/frontail/index.js:79:14)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (module.js:662:10)
    at Module.load (module.js:564:32)
    at tryModuleLoad (module.js:504:12)
    at Function.Module._load (module.js:496:3)
    at Module.require (module.js:595:17)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/snapshot/frontail/bin/frontail:2:1)
ak2766 commented 2 years ago

I've just hit this issue as well.

kamilkosek commented 2 years ago

Same here

masaru-natsu commented 2 years ago

Same issue, I'm running CentOS 8.2 `pkg/prelude/bootstrap.js:1244 throw error; ^

TypeError: SocketIO is not a constructor at Object. (/snapshot/frontail/index.js:79:14) at Module._compile (pkg/prelude/bootstrap.js:1320:22) at Object.Module._extensions..js (module.js:662:10) at Module.load (module.js:564:32) at tryModuleLoad (module.js:504:12) at Function.Module._load (module.js:496:3) at Module.require (module.js:595:17) at Module.require (pkg/prelude/bootstrap.js:1225:31) at require (internal/module.js:11:18) at Object. (/snapshot/frontail/bin/frontail:2:1)`

jonespm commented 2 years ago

Version 4.9.1 and the code in master (when built as a package) doesn't give an error during startup. But in the browser console there's an error below and there's nothing in the output. The last version that works is 4.9.0.

4.9.1: socket.io.js:8 WebSocket connection to 'wss://<URL>/tail/socket.io/?EIO=3&transport=websocket' failed:

master:

(index):41 Uncaught ReferenceError: io is not defined
    at (index):41:22
(anonymous) @ (index):41
themocs commented 7 months ago

Hi there! @jonespm to solve this error just add: "node_modules/socket.io/client-dist/*.js" on package.json pkg assets, then regenerate pkg build. Done! Cheers.