Sandip Dhang
Sandip Dhang

Reputation: 285

TypeError while importing Socket Client with ReactJS

I'm getting this error while importing the Socket into my React Component Socket Error Refernce

I'm using "react": "^17.0.2", and "socket.io-client": "^4.3.1" versions.

I have only added this line and it comes up with this error

React Component

I have also tried without { } (curly brackets) but nothing changed. I searched google a lot but all having the same king of import and works well for them. Whats going wrong for my case ?

Upvotes: 1

Views: 141

Answers (1)

Sandip Dhang
Sandip Dhang

Reputation: 285

Don't know how but deleting the node_modules folder and reinstall all packages fresh is solved my problem.

Upvotes: 1

Related Questions