Code 10 is a driver issue.
If it is a clone board you may need additional drivers that are not supplied with the IDE
Could be either CH340/341 or CP2102
This issue come up a lot so you can find additional information by reading a few posts in the section.