How to install puppeteer on Amazon Linux 2023

Sdílet
Vložit
  • čas přidán 1. 05. 2023
  • server: / discord
    Error when using puppeteer on EC2? This is due to missing dependencies and will be fixed using these commands.
    commands:
    "npm install puppeteer" - Install puppeteer
    "sudo yum install libXcomposite libXdamage libXrandr libgbm libxkbcommon pango alsa-lib atk at-spi2-atk cups-libs libdrm" - Installs missing dependencies
    After this, puppeteer should be working
  • Hry

Komentáře • 14

  • @hamidtahir6634
    @hamidtahir6634 Před 2 měsíci

    Yo are such a savior man
    Thanks

  • @satyadeepm
    @satyadeepm Před 9 měsíci

    Thank you so so much!!! This solved the problem.

  • @vgvishesh2008
    @vgvishesh2008 Před 11 měsíci

    Awesome, this saved me tons of time and effort. Cheers mate!

  • @rameshmanickam3144
    @rameshmanickam3144 Před 3 měsíci

    You are a true savior 🙏

  • @syncsteve
    @syncsteve Před 9 měsíci

    Thanks!

  • @user-yk4dk1xq1l
    @user-yk4dk1xq1l Před 6 měsíci

    works, thanks bro

  • @mike-wm9ji
    @mike-wm9ji Před 5 měsíci

    worked ty

  • @Agora_BoardGames
    @Agora_BoardGames Před 7 měsíci

    worked!

  • @htetnaungnaung2297
    @htetnaungnaung2297 Před rokem

    I just did like your steps and it still show the error

    • @legendsmnd
      @legendsmnd  Před rokem

      what error does it show?

    • @dionyborges132
      @dionyborges132 Před 6 měsíci

      @@legendsmndPresent this error:
      E: Unable to locate package libXcomposite
      E: Unable to locate package libXdamage
      E: Unable to locate package libXrandr
      E: Unable to locate package libgbm
      E: Unable to locate package libxkbcommon
      E: Unable to locate package pango
      E: Unable to locate package alsa-lib
      E: Unable to locate package atk
      E: Unable to locate package at-spi2-atk
      E: Unable to locate package cups-libs
      E: Unable to locate package libdrm

  • @abelmurua6980
    @abelmurua6980 Před 6 měsíci

    I had the same error, I followed the same steps but I keep getting the same error (my AWS ElasticBeanslkta is running => Node.js 18 running on 64bit Amazon Linux 2023/6.0.3).
    What could it be? Amazon Linux 2023 its on 64 bit, could that be the reason? ( :/):
    /home/ec2-user/node_modules/@puppeteer/browsers/lib/cjs/launch.js:271
    reject(new Error([
    ^
    Error: Failed to launch the browser process!
    /home/ec2-user/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: /home/ec2-user/.cache/puppeteer/chrome/linux-119.0.6045.105/chrome-linux64/chrome: cannot execute binary file

    • @legendsmnd
      @legendsmnd  Před 6 měsíci

      I'm not sure, this tutorial only fixes the issue where Amazon Linux 2023 is missing the necessary dependencies for puppeteer. What I'd try is a previous version of puppeteer to see if that works. If that doesn't work, you should also try to just run the minimum amount of code for puppeteer to function and see if any other code is messing with it.

    • @abelmurua6980
      @abelmurua6980 Před 5 měsíci

      @@legendsmnd I gave up after I read a comment from the developers saying that it wouldn’t work on a 64 bit machine because some libraries that puppeteer uses weren’t upgraded for 64 bits yet. So had to do it using html2canvas and jsPdf. Thank you for replying though!