Vue-Socket.io icon indicating copy to clipboard operation
Vue-Socket.io copied to clipboard

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

Open joaorbdg opened this issue 4 years ago • 1 comments

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",

joaorbdg avatar Oct 05 '21 21:10 joaorbdg

Did you try npm install socket.io-client ?

levarberry avatar Nov 02 '21 22:11 levarberry