MetinSeylan / Vue-Socket.io

😻 Socket.io implementation for Vuejs and Vuex
https://metin.sh
MIT License
3.95k stars 496 forks source link

Importing socket.io-client into components in Vue #322

Closed Rizzful closed 2 years ago

Rizzful commented 2 years ago

have been encountering the same problem with importing the package module with error code:

vendor.a03adc80.js from UglifyJs
Name expected [./node_modules/engine.io-client/build/esm/util.js:2,7][vendor.a03adc80.js:202,19]

 FAIL  Compiled with errors!

Fixed it with importing higher directory files: import socketio from "socket.io-client/dist/socket.io";

Found the solution at socket.io git: link