1
votes

I have installed Browsershot to Laravel the same way like here (https://github.com/spatie/browsershot ) and when I try to do something it gives me this error.

The command "node "C:\xp\htdocs\staticit\vendor\spatie\browsershot\src/../bin/browser.js" "{\"url\":\"https://google.com\",\"action\":\"screenshot\",\"options\":{\"type\":\"png\",\"path\":\"C:\xp\htdocs\staticit\app\Http\Controllers/temp/testScreenshot.png\",\"args\":[],\"viewport\":{\"width\":800,\"height\":600}}}"" failed. Exit Code: 1(General error) Working directory: C:\xp\htdocs\staticit\public Output: ================ Error Output: ================ 'node' is not recognized as an internal or external command, operable program or batch file.

I have installed node modules in my Laravel project root folder and when I write node -v in my cmd it is recognized.

**Note: I'm using Win7 , Laravel 5.7 and node ,php latest version.

1
Node is definitely in your path?Prodigle
@Prodigle Yes, it is.Adi Krasimirova
I have same issue.Basem Olimy
got same error .siros

1 Answers

1
votes

So the problem was that my OS is Windows, when I switched to Ubunto everething worked fine. I have opened this issue in the github repo of the creator, but he closed it because he dosen't use Windows.