Cannot find module "laravel-echo"
laravel-5.5
Solution
I needed to install below packages.
npm install -g laravel-echo-server
then following the step by step instruction as give here
Finally put below code before any js file.
<script src="http://{{ Request::getHost() }}:6001/socket.io/socket.io.js"></script>
Problem
I am learning to configure Laravel Echo Socket.js and following an article here Code in bootstrap.js is below ``` import Echo from "laravel-echo" window.Echo = new Echo({ broadcaster: 'socket.io', host: window.location.hostname + ':6001' }); ``` When I run the above code, it says, Cannot find module "laravel-echo" I am not using pusher and redis. In the above reference page, I think, there is no installation guidelines given for only socket.io Can somebody explain if I am missing anything?