Hi @gkarthick87,
Try to run below commands before setup:upgrade command
1. rm -rf generated/* var/page_cache/* var/cache/* var/view_preprocessed/*
2. chmod 777 -R var/* generated/*
3. php bin/magento setup:upgrade
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!