i have cloned my project from github when i try to composer install on laragon terminal i get this following error
PusherPusher::__construct(): Argument #1 ($auth_key) must be of type string, null given
my php these are my versions
"require": {
"php": "^8.0",
"guzzlehttp/guzzle": "^7.0.1",
"hisorange/browser-detect": "^5.0",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.3",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"pusher/pusher-php-server": "^7.2",
"stancl/tenancy": "^3.4"
},
i tried composer update and composer dump-autoload i want to have all the dependices for my project please help
2
Answers
Somewhere you are using the Pusher library and it is likely loaded as part of a service provider or something.
Whatever
.env
variable you have for Pusher is missing, which is causing the value to be null rather than a string.If you add the values to your
.env
file, it should make the error go away.Below is an example of what I mean you should add:
In my case, it was because I commented out
PUSHER_APP_ID
,PUSHER_APP_KEY
andPUSHER_APP_SECRET
in my.env
file, adding them back (even without value) solved the issue.