This post at the MS forum may help (it is a bit lengthy). 
Hi, I have this old Dell Inspiron, where was previously installed windows 8 Pro. The laptop had problems, and I was unable to update to 8.1 or Windows 10, therefore I erased the disk and tried to install windows 8.1 and then upgrade to 10. Unfortunately, it seems the product key has been lost in some unknown way. I am unable to activate Windows. How could I reinstall the factory provided Windows 8 OS? Is it possible to do something or, since I cannot find the original product key,  Regards,
unable to reinstall windows after disk erase