Issues with Puppeteer
I'm using a package that internally uses puppeteer to convert markdown to a pdf, ive tried everything i can think of but i end up getting this error:
Which means the project is being ran as root, but puppeteer doesn't support that. I've also tried specifying in the launch options --no-sandbox:
Since its working locally im pretty sure the only issue is that the project is ran as root, and i was wondering if it was possible to fix this error? I can't seem to find a good way to convert markdown to a PDF without puppeteer, most packages on npm use it internally.
15 Replies
Project ID:
6dd7933f-9582-4303-b591-7060ba6cf2f3
untested, but wouldn't this be the correct syntax?
Hm, ill try it and see if it changes anything
yeah, that didn't change anything. still the same error
is this the package you are using?
https://www.npmjs.com/package/md-to-pdf
yes
i will do some testing and get back to you
Thanks, I've never seen someone actually go out of their way to help that much before lol
this works for me
and just so you know
as_buffer
is not an option for either md-to-pdf or puppeteerwell the rest of the code sorta uses the buffer to create a stream to pipe to the client
(which worked locally when including that)
but thats odd
I will try this and see if it works, ty for your help
i searched the md-to-pdf packages repo for that config option
and the puppeteer
launch_options
does not have a as_buffer
option eitherso your saying it just returns it as a buffer by default?
eh it seems to work now
Tysm for your help
ive been working on this project non stop all day and my mind is going crazy lol
https://github.com/simonhaenisch/md-to-pdf/blob/master/src/lib/generate-output.ts#L9
yes it seems that it is buffer
mm ok
no problem 🙂