I have created the local setup from the live server. After that, I have copied the theme files like Porto and porto_rtl from the live server and pasted it on the local setup.
Then run all the command. but it throwing the js error
Compilation from source
failed Magento\Framework\View\Asset\File\NotFoundException: Unable to
resolve the source file for
This issue due to theme directory or theme vendor name is renamed.
Try below step to fix this.
Change your theme vendor first letter in capitol.
Change the theme directory name into theme's.
app\design\frontend\<Your-Vendor>\<theme-name>\theme.xml (if parent theme is not default magento)
Now, delete your current theme entry from the "theme" table, but
keep back-up of this table before removing custom theme entry
Now run the command for setup-upgrade, static content deploy, and