Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Adams_'s avatar

Converting HTML to PDF with Browsershot throw an Error "The command "node ...

Please anyone with an idea how to solve this error when I tried downloading PDF using Browsershot should help. I installed the requirement which is Puppeteer Node library, my node version is 16.16.0

The command "node ^"C:^\wamp64^\www^\fegocomosa^\vendor^\spatie^\browsershot^\src/../bin/browser.js^" ^"^{^^"url^^":^^"file:^/^/C:^^\WINDOWS^^\TEMP^^\1660646332-0352127001662128380^^\index.html^^",^^"action^^":^^"pdf^^",^^"options^^":^{^^"path^^":^^"Adam_resume.pdf^^",^^"args^^":^[^],^^"viewport^^":^{^^"width^^":800,^^"height^^":600^},^^"displayHeaderFooter^^":false^}^}^"" failed. Exit Code: 1(General error) Working directory: C:\wamp64\www\fegocomosa\public Output: ================ Error Output: ================ [Error: EBUSY: resource busy or locked, open 'C:\wamp64\www\fegocomosa\public\Adam_resume.pdf'] { errno: -4082, code: 'EBUSY', syscall: 'open', path: 'C:\wamp64\www\fegocomosa\public\Adam_resume.pdf' }

0 likes
2 replies
Adams_'s avatar

@Sinnbeck the error has something to do with the terminal I opened in vs code, when I closed it's working fine.

Please or to participate in this conversation.