I changed the motherboard of a MacBook Air A1465 11" mid 2013 because the previous one had a problem with the RAM. I boot the device in recovery mode in order to install the OS but the SSD is not recognised by the disk utility, so I search online and I find that I can see if the terminal recognises the SSD, in fact it does. I use the command diskutil list and It appears a list of disks with my SSD in it.
Then I try to use the commands "diskutil eraseDisk JHFS+ mySSD /dev/disk22", "diskutil eraseDisk /dev/disk22", "diskutil partitionDisk /dev/disk22 GPT JHFS+ New 0b" and each time the process starts but after a while I receive a Error saying: "Error: -69877: Couldn't open device". After this error the disk disappears from the disks list.
I found out that when I use the command "diskutil unmountDisk /dev/disk22" I can actually see the disk in the disk utility interface, but when I try to erase it as I did before, the same error occurs.