Just get a new Arduino NanoP/N 1050-1001-ND / A000005 and unable to upload code to it from the Arduino IDE? Arduino recently made changes to the bootloader on this board which requires updates to the AVR core in the IDE. Please see the note below copied from https://www.arduino.cc/en/Guide/ArduinoNano
NOTE: We have updated the NANO board with a fresh bootloader. Boards sold from us from January 2018 have this new bootloader, while boards manufactured before that date have the old bootloader. First, make sure you have the Arduino AVR Core 1.6.21 or later looking at the Board Manager. Then, to program the NEW Arduino NANO boards you need to chose Processor > “ATmega328P”. To program old boards you need to choose Processor > “ATmega328P (Old Bootloader)”. If you get an error while uploading or you are not sure which bootloader you have, try each type of processor 328P until your board gets properly programmed.