Socket.io: Module not found: Can't resolve 'uws' in 'C\:....\node_modules\engine.io\lib'

So I just had this same issue, but for a very different reason. Currently when I install the latest socket.io server package from npm uws will not be found.

This is happening because the publisher of uws has recently uploaded an empty package deleting all of the actual code D:

You can fix this by installing the last non destroyed release

yarn add [email protected] npm install [email protected]

Link to empty / deprecated package: https://www.npmjs.com/package/uws

Insightful background info from reddit: https://www.reddit.com/r/node/comments/91kgte/uws_has_been_deprecated/

I'm going to post this in the top few results that come up when searching for this issue as it took me a while to figure out what was up and hopefully this will save someone out there some time!


Try using socket.io-client

Here is the code:

import openSocket from 'socket.io-client';

const socket = openSocket(myURL);