I'm not sure if this will help EVERYONE, but I hope it at least helps someone. I had the same issue with several different boards (3 Nano's, 2 NodeMCU ESP8266's, and 1 Uno). I searched and searched for an answer and I kept reading about this pin or that pin being "pulled low" or "pulled hi" interfering with uploading sketches. Well, since I couldn't find a solid answer anywhere I decided to disconnect all of the peripherals hooked to my board (except for powers and grounds) and Wah Laa!!! The sketch uploaded like it was supposed to. So, I believe if you just unhook all of the sending and receiving pins from all of your peripherals during upload, the sketch should upload just fine. I hope this helps you.