I had this problem. Just remove each nipple and replace any that are damaged. Clean the spoke threads and relube the nipple threads and shoulders. Retension to a sufficiently high tension this time and retrue. I rebuilt a rear wheel that had a lot of winter miles resulting in corrosion and dirt in the spoke nipples. After the rebuild, the wheel has stayed perfectly true despite lots of miles on rough roads.
No need to buy a new rim or spokes.