Unable to generate / save PDF getting error 'node' is not recognized as an internal or external command, operable program or batch file #32
Replies: 4 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
-
Found a solution through browsershots forum. The problem is while running with php artisan serve
this will fix the node not found exception and old headless implementation warning. |
Beta Was this translation helpful? Give feedback.
-
Try using the disk() instead. Eg:
The disk should be in the filesystems.php
|
Beta Was this translation helpful? Give feedback.
-
public function generatePDF()
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
A simple test file is not being saved as PDF. Keep getting the above error message.
Pdf::view('support.test')->save('test.pdf');
The view is a simple 1 sentence. Windows 11 / node installed and is on the path.
Any help on this would be great. The full error text follows:
The command "node "C:\Users\xxx\Desktop\xx\vendor\spatie\browsershot\src/../bin/browser.cjs" "{""url"":""file:\/\/C:\\Users\\xxx\\AppData\\Local\\Temp\\1919060455-0013397001704897567\\index.html"",""action"":""pdf"",""options"":{""path"":""test.pdf"",""args"":[],""viewport"":{""width"":800,""height"":600},""displayHeaderFooter"":false,""printBackground"":true}}"" failed. Exit Code: 1(General error) Working directory: C:\Users\xxx\Desktop\xx\public Output: ================ Error Output: ================ 'node' is not recognized as an internal or external command, operable program or batch file.
Beta Was this translation helpful? Give feedback.
All reactions