MetinSeylan / Vue-Socket.io

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

Could not find a declaration file for module socket.io-client #319

Open joaorbdg opened 3 years ago

joaorbdg commented 3 years ago

Nuxt application compiler is throwing the following error:

 ERROR  ERROR in /node_modules/vue-socket.io/index.d.ts(1,28):
1:28 Could not find a declaration file for module 'socket.io-client'. '/node_modules/vue-socket.io/node_modules/socket.io-client/lib/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/socket.io-client` if it exists or add a new declaration (.d.ts) file containing `declare module 'socket.io-client';`
  > 1 | import SocketIOClient from "socket.io-client";
      |                            ^
    2 | import {
    3 |     DefaultComputed,
    4 |     DefaultData,

Libraries version

"socket.io-client": "^2.1.1",
"vue-socket.io": "^3.0.10",
levarberry commented 2 years ago

Did you try npm install socket.io-client ?