I am currently trying to clone an existing project of mine from github. After clone I run composer install
during the process I receive the following error:
Also this is due to a syntax error in some file in the conf/ directory or .env file.
In my case I got this error because I forget to put ::class
at the end of the line when adding a service provider and facade, to the array providers and alises in conf/app.php file. I corrected this and the error disappeared.