Padocia / Laravel-Nova-Pdf

MIT License
21 stars 9 forks source link

Laravel Nova 4.27.13 generate pdf issue #21

Open asanchez19 opened 2 months ago

asanchez19 commented 2 months ago

I know that there are related issues but the fixes reported but didn't work for me.

Error:

"The command \"PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH=npm root -gnode '.../vendor/spatie/browsershot/src/../bin/browser.cjs' '{\"url\":\"file:\\/\\/\\/var\\/tmp\\/894688774-0157765001724126448\\/index.html\",\"action\":\"pdf\",\"options\":{\"args\":[],\"viewport\":{\"width\":800,\"height\":600},\"displayHeaderFooter\":false,\"format\":\"A4\"}}'\" failed.\n\nExit Code: 127(Command not found)\n\nWorking directory: /.../public\n\nOutput:\n================\n\n\nError Output:\n================\nsh: npm: command not found\nsh: node: command not found\n"

I already run:

composer require padocia/laravel-nova-pdf

and

npm install puppeteer

image

Please help :)