How to fix Error: Socket is destroyed in Node.js | DevErrors