verumconsilium / laravel-browsershot

Browsershot wrapper for Laravel 5
MIT License
111 stars 20 forks source link

Spatie\Browsershot\Browsershot::setNodeBinary() must be of the type string #19

Open Crouxie opened 4 years ago

Crouxie commented 4 years ago

Hello guys,

I found error during trying to use ur wrapper around browsershot: Argument 1 passed to Spatie\Browsershot\Browsershot::setNodeBinary() must be of the type string, null given, called in.....vendor\verumconsilium\laravel-browsershot\src\Wrapper.php on line 47

Any hints how to solve it without removing package? Thanks

seyfer commented 3 years ago

@Crouxie it has to be a string, if you look into browsershot.php, there is a default config. 'npmBinary' => env('NPM_BINARY_PATH', ''), check if it is set to string, not null. And if you call the method setNpmBinary() manually check you provide a string.

Lizwis commented 3 years ago

@seyfer thanks this fixed the issue