Nibs are not small beans
A nib is a cacao bean with the husk removed and the kernel broken into pieces. That sounds like a minor difference. For roasting it is a large one, and it is why bean roasting advice will burn your nibs.
Three things change:
The husk is gone. On a whole bean the shell acts as a partial barrier between the heat and the kernel. A nib has no such protection — heat reaches the material directly.
They are much smaller. Far more surface area relative to mass, so they heat far faster and respond much more quickly to a change in heat.
They are already partly roasted, usually. Most nibs are made by roasting whole beans and then cracking and winnowing them. If you bought nibs, they have probably already had a roast. Anything you do is a second application of heat, not a first.
Net effect: nibs need less heat and much less time than whole beans, and the window between "nicely toasted" and "burnt" is narrow.
Why you would roast nibs at all
Two legitimate reasons, and one common misunderstanding.
To toast raw nibs. If your nibs genuinely are unroasted, you are doing the job the bean roast would have done — developing aromatics and driving off moisture.
To refresh or push already-roasted nibs. A light second toast can lift nibs that have been sitting, or take a lightly-roasted nib somewhere darker for a specific use.
The misunderstanding: that roasting nibs is a substitute for roasting the beans properly. It is not. Roasting whole beans and then winnowing gives you the shell's protection during the roast and clean husk separation afterwards. Winnowing raw and then roasting nibs is harder on both counts — raw shell clings, and unprotected nib is easy to overcook. If you are making chocolate from whole beans, roast the beans.