Preheat oven to 400 F degrees. Line a baking tray with aluminium foil and spray it with a nonstick spray. Set aside.
Peel and dice the sweet potatoes into cubes. Transfer to a bowl.
Add oil, cinnamon powder, nutmeg powder, salt and pepper and mix till well combined.
Transfer the sweet potatoes to the prepared baking tray.
Roast at 400 for 17-20 minutes or till tender. Remove from oven,and set aside.
In meanwhile melt butter in a pan. Cook it for around 2 minutes when it starts changing color, at this point add chopped pecans to it.
Cook on low heat for additional 1-2 minutes. The butter will give a nutty aroma by now and become brown in color. [Be careful not to burn it]
Add maple syrup, cranberries to pan and mix till combined.
Pour the prepared mixture over the roasted sweet potatoes and mix till all the potatoes are well coated with the syrup-butter mixture. If you want you can put it back in the oven for additional 2-3 minutes at this point.