$CFG->dataroot is defined in your config.php file in the Moodle root directory. Your localhost installation probably contains a value similar to my config (I run Moodle off XAMPP locally):
$CFG->dataroot = 'C:\\xampp\\moodledata';
The error message is telling you, rightly, that such a directory does not exist on the server. You need to edit config.php to change the dataroot value to the path of your Moodle directory on the server. You need to ask your hosting service what the path is.
I haven't had to move a Moodle installation from localhost to server, so I can't advise from experience. However, the following I found via Google and may be helpful:
Installing Moodle (Moodle Docs)
Moodle migration (Moodle Docs)
move from localhost to hosting (StackOverflow)
I doubt that there is an automated way to move from localhost to server, and expect that it has to be done manually, including script editing and database export/import.
Fred