question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect import of @types/socket.io

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

1reaction
EreckGordoncommented, Mar 16, 2018

yarn add @types/socket.io@1.4.31 fixed the problem because 1.4.32 typings are broken.

1reaction
BorntraegerMarccommented, Mar 16, 2018

I think it is not a NestJS error. See here: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24330

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found