'Unable to run react-native-windows after installing react-navigation

I installed the react-native windows application, following the steps mentioned here. After that I ran the application and it started up perfectly fine. Then I tried adding the react navigation package following the given steps. But when I try to build the application again I am getting the following error: Error I have spent a lot of time trying to figure it out and I have gone through various steps that I could find online to rectify this issue, but they have not been useful. I have also double checked that all the dependencies are installed. Any help will be greatly appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source