AbdoPrDZ / fixed-laravel-echo-server

The fixed version of laravel-echo-server (upgrade socket.io version to latest)
MIT License
1 stars 1 forks source link

Cannot read properties of undefined (reading 'readFileSync') #1

Closed HDVinnie closed 5 months ago

HDVinnie commented 5 months ago
fixed-laravel-echo-server init
? Do you want to run this server in development mode? No
? Which port would you like to serve from? 8443
? Which database would you like to use to store presence channel members? redis
? Enter the host of your Laravel authentication server. https://xxx.dev
? Do you want to add client connect endpoint No
? Do you want to add client disconnect endpoint No
? Will you be serving on http or https? https
? Enter the path to your SSL cert file. /etc/letsencrypt/live/xxx.dev/cert.pem
? Enter the path to your SSL key file. /etc/letsencrypt/live/xxx.dev/privkey.pem
? Do you want to generate a client ID/Key for HTTP API? Yes
? Do you want to setup cross domain access to the API? No
? Do you want to enable firebase admin service? No
? What do you want this config to be saved as? fixed-laravel-echo-server.json
appId: xxx
key: xxx
Configuration file saved. Run fixed-laravel-echo-server start to run server.

fixed-laravel-echo-server start

  ╔═══╗            ╔╗     ╔╗                        ╔╗      ╔═══╗    ╔╗           ╔═══╗
  ║╔══╝            ║║     ║║                        ║║      ║╔══╝    ║║           ║╔═╗║
  ║╚══╗╔╗╔╗╔╗╔══╗╔═╝║     ║║   ╔══╗ ╔═╗╔══╗ ╔╗╔╗╔══╗║║      ║╚══╗╔══╗║╚═╗╔══╗     ║╚══╗╔══╗╔═╗╔╗╔╗╔══╗╔═╗
  ║╔══╝╠╣╚╬╬╝║╔╗║║╔╗║╔═══╗║║ ╔╗╚ ╗║ ║╔╝╚ ╗║ ║╚╝║║╔╗║║║ ╔═══╗║╔══╝║╔═╝║╔╗║║╔╗║╔═══╗╚══╗║║╔╗║║╔╝║╚╝║║╔╗║║╔╝
 ╔╝╚╗  ║║╔╬╬╗║║═╣║╚╝║╚═══╝║╚═╝║║╚╝╚╗║║ ║╚╝╚╗╚╗╔╝║║═╣║╚╗╚═══╝║╚══╗║╚═╗║║║║║╚╝║╚═══╝║╚═╝║║║═╣║║ ╚╗╔╝║║═╣║║
 ╚══╝  ╚╝╚╝╚╝╚══╝╚══╝     ╚═══╝╚═══╝╚╝ ╚═══╝ ╚╝ ╚══╝╚═╝     ╚═══╝╚══╝╚╝╚╝╚══╝     ╚═══╝╚══╝╚╝  ╚╝ ╚══╝╚╝
----------------------------------------------------------------------------------------------------------
|                                   Powered By AbdoPrDZ "Just Code It";                                  |
----------------------------------------------------------------------------------------------------------

version 0.1.0

Starting server...

TypeError: Cannot read properties of undefined (reading 'readFileSync')
    at /usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/server.js:46:36
    at new Promise (<anonymous>)
    at Server.secure (/usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/server.js:42:16)
    at /usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/server.js:33:23
    at new Promise (<anonymous>)
    at Server.serverProtocol (/usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/server.js:31:16)
    at /usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/server.js:17:19
    at new Promise (<anonymous>)
    at Server.init (/usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/server.js:16:16)
    at /usr/lib/node_modules/@abdopr/fixed-laravel-echo-server/dist/echo-server.js:100:26
AbdoPrDZ commented 5 months ago

Hey there,

Thanks for reporting the issue! I've fixed it and rolled out an update. Just install the new version ^0.1.1 using this:

$ npm i @abdopr/fixed-laravel-echo-server@^0.1.1

Or if you like yarn:

$ yarn add @abdopr/fixed-laravel-echo-server@^0.1.1

Let me know if you need any more help!