DEV Community

Discussion on: How to make screenshots in Laravel with Browsershot

Collapse
 
jeenus14 profile image
blaster

Hi bro. My application always shows this:
Symfony\Component\Process\Exception\ProcessFailedException: The command "node ^"C:^\xampp^\htdocs^\NFT-Plus-Phase-2^\vendor^\spatie^\browsershot^\src/../bin/browser.js^" ^"^{^^"url^^":^^"https:^\/^\/google.com^^",^^"action^^":^^"screenshot^^",^^"options^^":^{^^"type^^":^^"png^^",^^"path^^":^^"test^\/googlescreenshot.jpg^^",^^"args^^":^[^],^^"viewport^^":^{^^"width^^":3840,^^"height^^":2160^},^^"landscape^^":true,^^"waitUntil^^":^^"networkidle0^^"^}^}^"" failed.

Exit Code: 1(General error)

Working directory: C:\xampp\htdocs\NFT-Plus-Phase-2\public

Output:

Error Output:

'node' is not recognized as an internal or external command,
operable program or batch file.
in file C:\xampp\htdocs\NFT-Plus-Phase-2\vendor\spatie\browsershot\src\Browsershot.php on line 862

Collapse
 
isaac97 profile image
アイザック

->setNodeBinary($path_to_node)

Collapse
 
merite15 profile image
Merite15

I'm on windows machine and i have this error For some reason Chrome did not write a file at test.pdf. Command ======= [] Output ======
Image description