hugo reports port 1313 is already in use. But its not

I tried to run the Hugo server command as I always do. But it gave me this error.

port 1313 already in use, attempting to use an available port
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1654d87]

I checked if the ports usage using netstat -ntlp and found nothing in the list.

I faced this issue earlier and at that time, I just uninstalled hugo using snap package manager and then reinstalled back again. And it worked that time. Now it doesnt.

What am I missing here. Note: Restarting the laptop also doesnt help.