Installing Browsershot to work with Laravel/Laradock on MacOS #753
Unanswered
paulgodard
asked this question in
Q&A
Replies: 2 comments
-
I am also facing the same issue when I am trying in my local Mac |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have the same issue, I think puppeteer needs to be installed in laradock's php-fpm container |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My objective is simple. I want to convert an html page to a PDF. I think Browershot is the best solution but I struggle to install it properly. I am using Laravel 9 with Laradock on Docker Desktop on my Mac Ventura.
I installed Browsershot, Puppeteer & chromium inside laradock in Terminal as follow :
No error there but when I try to use browsershot in a Laravel controller, I get this error:
or
The command "PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH=
npm root -g
node '/var/www/travelearn/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:///tmp/1646675856-0888310001688983574/index.html","action":"pdf","options":{"path":"/public/assets/pdfs/example.pdf","args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false}}'" failed. Exit Code: 127(Command not found) Working directory: /var/www/travelearn/public Output: ================ Error Output: ================ sh: 1: npm: not found sh: 1: node: not foundI really need some help... please.
Beta Was this translation helpful? Give feedback.
All reactions