'i am trying to access socket.io library on client side but unable to do it , my client-side js file is main.js inside the js folder (js/main.js)

 this is i have inculcated in my `chat.html` file to access the socket.io on client side ...main is my javascript  file on client side

please replace file in last line as main.js file present inside js folder

<script src="/socket.io/socket.io.js"></script>
<script src="file"></script>   

on console it is showing unreferenced socket.io referring to this below line i am using this on my client side javascript file const socket = io();



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source