`expand_path': couldn't find login name -- expanding `~' code example
Example: home': couldn't find login name -- expanding `~' (ArgumentError)
Search your php.ini with this commands: php --ini
For Me:
Loaded Configuration File: /etc/php/7.2/cli/php.ini
In your php.ini file, set variables_order = "EGPCS".