To fix Node.js socket.io.js not found, we expose the folder with socket.io.js as the static folder.
For instance, we write
app.use(express.static(path.join(__dirname, "/")));
to call express.static
to expose the root folder as the static folder.
And then we can put socket.io.js
there and use it in a script tag like
<script src="//socket.io.js"></script>