Q: vue-socket.io socketio is not defined I'm trying to use vue-socket.io package here, so I did install it first then imported it in the app.js file, but in the Vue.use line the socketio throws a console error Uncaught ReferenceError: socketio is not defined:
npm install vue-socket.io --save

import VueSocketio from 'vue-socket.io';
Vue.use(VueSocketio, socketio('http://localhost:3000'), store);


A: The documentation suggests a default configuration.
import VueSocketio from 'vue-socket.io';
Vue.use(VueSocketio, 'http://socketserver.com:1923');

If you want to use the one you're using
import VueSocketio from 'vue-socket.io';
Vue.use(VueSocketio, socketio('http://localhost:3000'), store);

You're going to have to import socketio from somewhere. Your script doesn't know what that is. Looking at the source suggests that you could do this:
import VueSocketio from 'vue-socket.io';
import socketio from 'socket.io-client'

Vue.use(VueSocketio, socketio('http://localhost:3000'), store);

