Issue with browsershot generating pdf only in prod

I am trying to use spatie laravel-pdf which uses browsershot under the hood to generate a pdf. I get the bellow error only on the production server when trying to generate the pdf which seems to not include any useful information regarding the problem. The index.html file does contain the contents I’m expecting. Confirmed nodejs folder in system path env variable.

The command “node C:inetpubwwwrootmyprojectvendorspatiebrowsershotsrc/../bin/browser.cjs “{“”url””:””file://C:WindowsTEMP607378296-0455840001752189861index.html””,””action””:””pdf””,””options””:{“”args””:[],””viewport””:{“”width””:800,””height””:600},””displayHeaderFooter””:false,””margin””:{“”top””:””0.25in””,””right””:””0.25in””,””bottom””:””0.25in””,””left””:””0.25in””},””format””:””letter””,””landscape””:true,””printBackground””:true}}”” failed. Exit Code: 1(General error) Working directory: C:inetpubwwwrootmyprojectpublic Output: ================ Error Output: ================

I have the following controller method which is used to generate the pdf.

<?php

namespace AppHttpControllers;

use SpatieLaravelPdfEnumsFormat;
use SpatieLaravelPdfEnumsUnit;
use SpatieLaravelPdfFacadesPdf;

class ExportController extends Controller
{
    public function pdf() {
        $pdf = Pdf::view('table-pdf');

        return $pdf->format(Format::Letter)
            ->margins(0.25, 0.25, 0.25, 0.25, Unit::Inch)
            ->landscape()
            ->name("myfile.pdf");
    }
}

I’ve tried using withBrowserShot method and called setNodeBinary() and noSandbox() methods, neither of which made any difference. Any ideas as to where to start? I’ve tried uninstalling and reinstalling puppeteer which did not help.