Вот код
Все установлено
import Echo from "laravel-echo"
window.io = require('socket.io-client');
window.Echo = new Echo({
broadcaster: 'socket.io',
host: window.location.hostname + ':6001'
});
Не работает, подскажите в чем проблема?
Uncaught TypeError: io is not a function
at SocketIoConnector.connect (app.js:7285)
at new Connector (app.js:6278)
at SocketIoConnector. (app.js:6247)
at new SocketIoConnector (app.js:7266)
at Echo.connect (app.js:7550)
at new Echo (app.js:7524)
at Module../resources/js/bootstrap.js (app.js:26893)
at __webpack_require__ (app.js:20)
at Object../resources/js/app.js (app.js:26856)
at __webpack_require__ (app.js:20)