[GH-ISSUE #244] TypeError: SocketIO is not a constructor #159

Open
opened 2026-03-03 16:05:43 +03:00 by kerem · 5 comments
Owner

Originally created by @janilahti on GitHub (Sep 22, 2021).
Original GitHub issue: https://github.com/mthenw/frontail/issues/244

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)
Originally created by @janilahti on GitHub (Sep 22, 2021). Original GitHub issue: https://github.com/mthenw/frontail/issues/244 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) ```
Author
Owner

@ak2766 commented on GitHub (Nov 21, 2021):

I've just hit this issue as well.

<!-- gh-comment-id:974743435 --> @ak2766 commented on GitHub (Nov 21, 2021): I've just hit this issue as well.
Author
Owner

@kamilkosek commented on GitHub (Dec 20, 2021):

Same here

<!-- gh-comment-id:997666068 --> @kamilkosek commented on GitHub (Dec 20, 2021): Same here
Author
Owner

@masaru-natsu commented on GitHub (Jan 11, 2022):

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)`

<!-- gh-comment-id:1010180716 --> @masaru-natsu commented on GitHub (Jan 11, 2022): Same issue, I'm running CentOS 8.2 `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)`
Author
Owner

@jonespm commented on GitHub (Apr 25, 2022):

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
<!-- gh-comment-id:1109073813 --> @jonespm commented on GitHub (Apr 25, 2022): 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 ```
Author
Owner

@themocs commented on GitHub (Dec 1, 2023):

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.

<!-- gh-comment-id:1836773486 --> @themocs commented on GitHub (Dec 1, 2023): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/frontail#159
No description provided.