Incorrect import of @types/socket.io
See original GitHub issueI’m submitting a bug report
[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
/@nestjs/websockets/adapters/io-adapter.d.ts
is not importing socket.io correctly. It is a bus with new version of @types/socket.io package
Environment
Nest version: 4.6.6
Socket.io: 2.0.4
@types/socket.io: 1.4.32
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
unable to import and use typescript socket.io - node.js
Ok I figured things out. The problem was that my client server (hosting the page), needed the actual cdn or js socketio file....
Read more >Server Initialization | Socket.IO
First, you need to install the types: npm i --save-dev @types/socket.io. import { createServer } from "http";
Read more >@types/socket.io-client - npm
Stub TypeScript definitions entry for socket.io-client, which provides its own types definitions. Latest version: 3.0.0, last published: 2 ...
Read more >Trying to switch to Typescript under Jovo v3 - Questions
1 /// <reference types="socket.io-client" ... Property 'get' does not exist on type 'typeof import("C:/myProjectDirectory/node_modules/axios/index")'.
Read more >Usage - nuxt socket.io - Netlify
Using nuxt-socket-io in your components. ... to have this behavior, you can disable it by setting teardown to false when you instantiate the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yarn add @types/socket.io@1.4.31
fixed the problem because 1.4.32 typings are broken.I think it is not a NestJS error. See here: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24330