Hi @hamza_shahid1 ,
Which version of Magento and which version of PHP are you using?
I am using latest version of Magento. Every thing was working fine.I created approx 36 websites stores,store views,root categories e.t.c on my magento and then migrated from m1 to m2.Worked fine.I have had infortis theme installed on another pc.I just copied the app and pub folder and from there and pasted into my new magento installation .That's when it started to trouble and generating errors.I guess I shouldn't have done that because some files are replaced or merged and that's possibly the reason my cli, magento admin panel and store front end is not working
You cannot replace the app folder because in etc folder config.xml have containig configuration of module. maybe that is causing the issues.
You can copy those folder
then run following command
php bin/magento setup:upgrade