简体   繁体   中英

Laravel echo server - Cannot read property '1' of null

I'm trying to setup Laravel echo server for my real time chat application,I am following this tutorial https://medium.com/@dennissmink/laravel-echo-server-how-to-24d5778ece8b , I have setup and installed the Laravel echo server package, but when I run laravel-echo-server start , it always brings the error below, Please what may be wrong

在此处输入图片说明

我遇到了同样的错误,在“端口”上有错误的值:“y”,所以,我建议仔细检查 laravel-echo-server.json 文件。

Here how it worked for me,

I was setting "authHost": " http://localhost:8000 " in laravel-echo-server.json file

you can do this also after you run laravel-echo-server init and provide the URL there.

so the port was the culprit there.

the solution was to just map the URL.

like I use laravel valet so I mapped my website to something.test

then the URL in my laravel-echo-server file to "authHost": " http://something.test "

then I ran laravel-echo-server start and It worked.

When you have run the command laravel-echo-server init... on PORT you have mentioned Yes instead of enter key. This lead the problem.

Just run the command laravel-echo-server init --while on port option either mention a port number or just enter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM