Unity 2017.4+ no longer supports editing prefabs with a missing script. Either manually or through script. This can result in errors or crashes with the script below.
If you have missing scripts after uninstalling Nested Prefabs, the recommended workaround is:
It can happen that there are components with a missing script in your project. For example, when a script is deleted or the GUID of the asset changed.
Unity will show an error when applying or reverting prefabs with a missing script. Unfortunately, this is an internal Unity error and is not caused by Nested Prefabs. Therefore we can't fix it either.
However, with the following script, you can clean your project from any missing scripts. In order to run the script please import it into an 'Editor' folder in your project. After importing you can run the script by choosing 'Components/Remove Missing Scripts from Project' from the top-menu in Unity.