-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Not supported for windows #70
Comments
facing same issue node available in windows path, accessible from cmd prompt / terminal |
got a new error by adding withbrowsershot, found this by diving into the code, found it later in the docs and adding setNodeBinary with path to node Its a start, I will explore further and report
|
upon further testing, it seems to concrn with puppeteer and some path related matter on windows Browsershot::url('https://example.com') new error, same error shows when I use laravel-pdf, so the error is a bit more upstream... though I would appreciate if any guidance and help is provided, am stuck on where to go now |
another update, running simple browsershot command in the terminal works
and also the below works as well in terminal
|
after much code diving, it seemed that the process of puppeteer being run by browsershot was not getting any environment variables, I traced the process creation to line 1032 in file vendor/spatie/browsershot/src/Browsershot.php and modified
now I am able to generate PDF Files. I know am not supposed to modify files in vendor folders - need to check further also am sending the whole env of laravel, not sure if that is right or not - am currently running this locally. Mentioned this here as well: spatie/browsershot#728 |
This should be handled on Browsershot |
THANK YOUUUUUUU |
Thank you so much you saved my day |
Use this Instead npm install puppeteer --location=global |
What happened?
I want to use the laravel pdf, preview it or even download it, but I can't download or even preview the PDF, it keeps getting errors, like this
![image](https://private-user-images.githubusercontent.com/34405837/302010310-46688ca9-751c-465c-b0d8-def35a491c5e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzODgxNjksIm5iZiI6MTcxOTM4Nzg2OSwicGF0aCI6Ii8zNDQwNTgzNy8zMDIwMTAzMTAtNDY2ODhjYTktNzUxYy00NjVjLWIwZDgtZGVmMzVhNDkxYzVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI2VDA3NDQyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE5NWU1ZWRiOTY4NzFmMzliMWQ2MjI5MTY2NDBjNTAxMTBiNWI1Zjc5MmU5YjRlYTUzMmYzNWQ2NWM0NzY3MWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JasFm2aXWP0B6a9X8baupijH-ZpMLftxlS-wB1D37EI)
*Additional information
Node Version: v21.6.1
Npm Version: 10.4.0
How to reproduce the bug
I'm using this basic code just for trying but it keep getting the error
Package Version
1.1.2
PHP Version
8.2.10
Laravel Version
10.42.0
Which operating systems does with happen with?
Windows
Notes
No response
The text was updated successfully, but these errors were encountered: