Error uploading sketches with latest 1.8.1

1.8.5 is the latest, give that a try.
https://www.arduino.cc/download_handler.php?f=/arduino-1.8.5-windows.zip

Also make sure it's not something basic like a broken USB cable. They don't last forever.