Do you have enough free space on the SD card to build the game?
If there's plenty of space enough to make the *.cia, you'll want to copy everything off the card, reformat in FAT32 + 32 KB cluster size with Windows File Explorer or
guiformat, and full Write + Verify the empty card with
H2testw.
Failure to make the CIA implies mismatching hashes for the contents (*.app) and title metadata (*.tmd).