I\'ve followed the exact same steps which have always previously worked for me, create application through express, place the module dependencies in the node_modules folder.
I solved this by running the index page by the Node.js server.
Most likely "index.html" and "/socket.io/socket.io.js" files should be served by your Node.js server.
as mentioned in the url Uncaught ReferenceError: io is not defined
So when I executed https://localhost:3000 (3000 the port where the nodejs has been started) the error got resolved.