How to Deploy a Node.js Puppeteer App to Render.com for Free

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 122

  • @Ajdin87
    @Ajdin87 8 месяцев назад +6

    This is one of the best and well explained tutorials I have ever come up accross, well spoken, consize, perfect. Thank you, hope you start making videos again soon.

  • @neerajbutola3753
    @neerajbutola3753 8 месяцев назад +4

    I think you missed to add NODE_ENV = production when you where adding env variables .This was the only working tutorial that is working for deploying pupeteer project on render
    for me . Thank you very much for the video :)

  • @markinger9814
    @markinger9814 8 месяцев назад +1

    Thanks so much man! I was so tired of trying to deploy it to vercel and other platforms using aws-lambda and trying to make it work... You literally saved me

  • @matthewhigley1018
    @matthewhigley1018 Год назад +6

    I totally agree with Gabriel. You've got a great teaching style @AviMamenko. It's quick and your zoom cuts really help focus on what you're talking about. One thing I don't ever see though is after the Chromium download error found in the Render logs, you didn't show the full process of how the issue was worked through. I don't feel enough dev show the problem solving side in their tutorials. Or at least highlight the key places to find answers when you're stumped. I would 100% watch you Google for answers.
    Or maybe you just knew it all exactly as you recorded it. In that case, your know-how is enviable.
    Either way, I hope to see more content in the future!

  • @cromuelbarut9859
    @cromuelbarut9859 4 месяца назад +1

    awesome! thank you so much, I've been suffering on deploying my scraper to netlify lol

  • @jyk595
    @jyk595 7 месяцев назад +1

    Incredible! Saved me a ton of headache. Thank you.

  • @kanucu252
    @kanucu252 6 месяцев назад

    You are a savior! My days of avoiding docker are over unfortunatly

  • @webtotheflow
    @webtotheflow 8 месяцев назад

    Thanks man, I was about to loose my mind over puppeteer in the cloud. Vercel, Google and Netlify didnt work for me. I’ll try this tomorrow 🙏🏾

  • @amitsharma8337
    @amitsharma8337 Год назад +1

    Pefect and to the point. Explained in clear and precise terms and actions. You probably saved me tonsss of googling today. Thank you!

  • @dev_navdeep
    @dev_navdeep Год назад +1

    thanks man, saved a days worth of research for me.

  • @cseckler
    @cseckler 9 месяцев назад

    Your video is really amazing! Well spoken, great timing, and all the right information. I wish you made more videos. I've subscribed.

  • @the-web-scraping-guy
    @the-web-scraping-guy Год назад

    Nice man! Super helpful thank you! I just had to get rid of "--single-process" and it worked!

    • @cseckler
      @cseckler 9 месяцев назад

      Why did you have to remove that?

  • @maxklink3979
    @maxklink3979 Год назад

    Thanks a lot for this video! I struggled a lot to deploy my Puppeteer app. And now it works 🤩

    • @AviMamenko
      @AviMamenko  Год назад +1

      No prob - yes, I did, too, before I figured it out!

  • @tenzinwoeser6842
    @tenzinwoeser6842 Год назад +1

    I absolutely love this. This is exactly what i needed. SUBSCRIBED!!!!!!

  • @AdityaSingh-ui4tr
    @AdityaSingh-ui4tr 8 месяцев назад

    You're Legend Bro! Big heart from India!!

  • @gerkim62
    @gerkim62 Год назад +1

    Thank you for this. I have been struggling to set up puppeteer

  • @mehdiahmed7836
    @mehdiahmed7836 10 месяцев назад

    amazing tutorial ! clear and concise ,thank you sir

  • @buildwithdamian
    @buildwithdamian 2 месяца назад

    Thanks for this one. Saved me hours!

  • @anbuparadox
    @anbuparadox Год назад

    This tutorial was godsend. Great work brother.

  • @juninhobh96
    @juninhobh96 Год назад

    Nice work man! Keep going!

  • @chrisbarber7291
    @chrisbarber7291 5 месяцев назад

    You freaking saved me with this, thank you!!

  • @MatheusHugo
    @MatheusHugo 2 месяца назад

    it works! thanks man

  • @oureducations
    @oureducations Год назад +2

    Thanks for explain easy understanding

  • @enteren7716
    @enteren7716 25 дней назад +1

    hi best tutorial i found so far. regardless i get following error in the render console when using scrape:
    throw new Error(`Browser was not found at the configured executablePath (${launchArgs.executablePath})`);
    Error: Browser was not found at the configured executablePath (/usr/bin/google-chrome-stable)
    im using puppeteer 23.5.0 with node v20.17.0
    can you tell me what that means or where the correct chrome path lies?

  • @philippschrittwieser3409
    @philippschrittwieser3409 Год назад

    Thank you so much! Exactly what I needed! :)

  • @AntoniKiddcodePutra
    @AntoniKiddcodePutra Год назад

    I am new visitor on your channel.
    I am so impressed, and gratefully found your channel.
    Thanks so much! Keep healthy.

  • @DeveloperSerean
    @DeveloperSerean 4 месяца назад +1

    You are my hero 🎊🎊

  • @EWANALLISON
    @EWANALLISON 9 месяцев назад

    This helped a bunch, thanks!

  • @benalt78
    @benalt78 7 месяцев назад

    outstanding video!

  • @miguelviloria4596
    @miguelviloria4596 Год назад +1

    great video, you have a new suscriber

  • @norbertoignaciojr3365
    @norbertoignaciojr3365 Год назад +1

    Thanks for this !

  • @lovewithcompetitiveprogramming
    @lovewithcompetitiveprogramming Год назад +2

    can you create a same functionality video for deploying code in aws lambda containerized image?

  • @Daianagee
    @Daianagee Год назад

    This is life changing thank you good sir

  • @terminal9191
    @terminal9191 9 месяцев назад +1

    Please somebody help , i can't interact with the browser and perform the actions. , only thing it does is visits the page i given and nothing do , i have to fill a form and click a button , the code works on my local machine but it does not work on render , everything else works perfect , not getting any error too .Please give me a solution to fill a form created by , and click a button made by .

  • @AryanRaj-zt6cq
    @AryanRaj-zt6cq Год назад

    You saved my time. Thanks man❤

  • @schreiandrej2000
    @schreiandrej2000 8 дней назад

    Very usefull! Thanks!

  • @chibuikem_nick
    @chibuikem_nick Год назад

    This was very helpful. Thank you 👍

  • @bonsayeb9620
    @bonsayeb9620 3 дня назад

    Thank you for this video. Is there a way to do wht you've done in this video using the latest stable version of Puppeteer? I've tried everything and just can't get it to work, supposedly its because since Puppeteer version 19.11.1 (one above the one in the video) the browser locations have been moved?
    Thank you either way

    • @bonsayeb9620
      @bonsayeb9620 2 дня назад

      So, the problem stems from the breaking change, `remove PUPPETEER_DOWNLOAD_PATH in favor of PUPPETEER_CACHE_DIR (#11605) ` introduced in 22.0.0 (2024-02-05)
      I haven't figured out how to solve it yet but if I do, I'll share it here incase others are interested too.

  • @alexandersamokhin
    @alexandersamokhin 6 месяцев назад

    It helped a lot. I got an error with the Node environment, but with Docker, it all went smoothly. However, my deploy is always in progress, what can be the issue?

  • @spy702007
    @spy702007 8 месяцев назад

    Thank you for your great tuto, I just can understand how you are able to use the url with "scrape" at the end. So for me I have a 502 error. When I try my render web service URL it replies "Render Puppeteer server is up and running!" but as soon as I type the url with /scrape at the end, it fails. Would be super nice to understand why. Thank you

  • @kathanmehtaa
    @kathanmehtaa 8 месяцев назад

    banger video dudeeee

  • @juliushernandez9855
    @juliushernandez9855 6 месяцев назад +1

    can i use puppeteer-extra instead of puppeteer?

  • @sonecajones
    @sonecajones Год назад

    Thank u! It worked!

  • @daviesn-y4w
    @daviesn-y4w Год назад

    Thanks Avi!

  • @edisonmondal2798
    @edisonmondal2798 2 месяца назад

    Dear Sir @Avi Mamenko,
    you have saved my life 🥺🥺❤❤🖤🖤❤❤

  • @luisenriquecarmenatemorale4469

    Just perfect !!!!!!

  • @teachttalkplanet5514
    @teachttalkplanet5514 Год назад +1

    @AviMamenko
    I've been repeatedly recieving this error on render : Error: Requesting main frame too early! at assert. My code works perfectly on local system. Can anyone help?

  • @r7verape
    @r7verape 7 месяцев назад

    THE GOAT!!!!

  • @kumaramit04-q6c
    @kumaramit04-q6c Год назад +1

    Hey, can you help us with running puppeteer with userDataDir profile in Render. I've tried putting the chrome profile to the root directory of my project, and used the relative path in puppeteer useDataDir. It works fine on localhost, but not working on production.

  • @miguelvelascodev
    @miguelvelascodev 7 месяцев назад

    Hi ! How are you ? Amazing video Man, thank you very much. But, im not understanding, how you are installing the dependencies, im trying to run "RUN npm install", but i got lot of trouble, so, how can i install Express , i didnt see that in the video. THank you so much again !

    • @areebasaleem7216
      @areebasaleem7216 7 месяцев назад

      try "npm install express" or "npm i express"

  • @shraj340
    @shraj340 5 месяцев назад +3

    For nextJS and Vercel

  • @EmadAbuAljazer
    @EmadAbuAljazer 10 месяцев назад

    Thank you for the tutorial!
    I'm getting the following error:
    Error: No element found for selector: .search-box__input
    Also, how can I run this locally using Docker?

  • @euGENIUS-ua
    @euGENIUS-ua 21 день назад +1

    Idk why, but I got this error when deploying: Browser was not found at the configured executablePath (/usr/bin/google-chrome-stable)
    the envs and executablePath set up right

    • @mathws1
      @mathws1 8 дней назад

      Same here! What version of puppeeter are you using? I'm using 23.6.0. but maybe I should try with the same shown in this video 19.7.2...

  • @IPTV-h3e
    @IPTV-h3e 25 дней назад

    When I set to headless= false then it's fail to launch how can I get pupperter on headless=fale
    I mean in gui.

  • @phamhoangtam1058
    @phamhoangtam1058 Год назад

    thanks a alot for this videos, it work with me

  • @Abhishekkumar-yq1cw
    @Abhishekkumar-yq1cw Месяц назад

    can anyone help when I am deploying my puppeteer app on render it builds fine but while deploying it says no open ports detected and is stuck in a loop, Please help what should I do

  • @ajharulhaquechoudhury8127
    @ajharulhaquechoudhury8127 Год назад +1

    when it runs RUN npm ci from the dockerfile , it says my pakage.json file has a error , it says it show parsing error. anyone with solutions. My node is 16.16.0 and puppeteer version is 19.7.2

    • @cseckler
      @cseckler 9 месяцев назад

      Make sure you have a package.lock file and not a yarn.lock file

  • @aguest5394
    @aguest5394 8 месяцев назад

    Is there not a way to do this without having to delete and recreate the project in render?

  • @anabeatriz8835
    @anabeatriz8835 3 дня назад

    13:44 how do u know this path?

  • @mvmclx5622
    @mvmclx5622 Год назад

    Thanks!

  • @victork7135
    @victork7135 3 месяца назад

    Hi I need help please and quickly. I am using a Postgres database running on Render ass well. After adding the docker file and running my web service, my program now refuses to connect to the database anymore.

    • @AviMamenko
      @AviMamenko  3 месяца назад +1

      In order to define multiple services, you can use a docker-compose.yml file which will set up the configurations for both your app and postgres. There are a few tutorials already out there for configuring nodejs and postgres with docker.

    • @victork7135
      @victork7135 3 месяца назад

      @@AviMamenko thank you. I found a fix for the errors

  • @verdientflash7308
    @verdientflash7308 Год назад

    Thanks dude It's very helpful
    Why don't you use nodemon

  • @sohamsarkar911
    @sohamsarkar911 Год назад

    I want to package my puppeteer app, would this will work there too!?

  • @harimzermeno4203
    @harimzermeno4203 Год назад +5

    Something went wrong while running Puppeteer: TimeoutError: Waiting for selector '' " 30000ms exceeded. HELP SOMEONE PLEASE

    • @cseckler
      @cseckler 9 месяцев назад

      I'm having the same problem sometimes while sometimes it works.

    • @hobbosen-jz4pq
      @hobbosen-jz4pq 8 месяцев назад

      puppeteer waits for the selector to appear but there's a 30 sec timeout. So if whatever selector you're looking for isnt loaded by 30sec it throws an error. there must be an issue with loading the page faster maybe due to the CPU limit on free plan? You can increase that timeout in puppeteer. that'll fix it

    • @WendelSodre
      @WendelSodre Месяц назад

      Set the value on your screen size ex: // await page.setViewport({ width: 1280, height: 1024 });

  • @nonyoo
    @nonyoo 5 месяцев назад

    Thanks!!!!

  • @abhaygohel298
    @abhaygohel298 7 месяцев назад

    thanks bro

  • @УрошТомић-у4ф
    @УрошТомић-у4ф Год назад +1

    What if you are generating pdf files with Puppeteer?

    • @gerkim62
      @gerkim62 Год назад

      I think it should work as well

  • @refreshing_morning
    @refreshing_morning 6 месяцев назад

    thank youuuu

  • @CrackesWorldSivakasi
    @CrackesWorldSivakasi Год назад

    Hi,
    It shows me this error. Please help.
    Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

    • @allainzenithn.sabandal2299
      @allainzenithn.sabandal2299 Год назад +1

      Try setting headless to true. It worked on my end.

    • @CrackesWorldSivakasi
      @CrackesWorldSivakasi Год назад

      @@allainzenithn.sabandal2299 Thank you for your response. After made the changes, the site keeps on loading and nothing showing in render logs too
      Any Idea?

  • @duygukocar7623
    @duygukocar7623 Год назад

    Hello I did everything but I have a problem with deploy my project to Render. Is there any update for dockerfile ?

    • @AviMamenko
      @AviMamenko  Год назад

      What is the error you are getting?

    • @HarshitChadha123
      @HarshitChadha123 Год назад

      use this in launch section: executablePath: puppeteer.executablePath()

  • @kameshrajput7193
    @kameshrajput7193 Год назад +2

    Hey, What to use as executable path on windows because /usr/bin/google-chrome-stable is not working?

  • @ManojTudu-sc5rb
    @ManojTudu-sc5rb Год назад

    Please help me with deploying my puppeteer app .. i am getting this error Tried to find the browser at the configured path (/usr/bin/google-chrome), but no executable was found.

    • @duygukocar7623
      @duygukocar7623 Год назад

      same error I have did you find any solution ?

    • @terminal9191
      @terminal9191 9 месяцев назад +1

      i believe it's "/usr/bin/google-chrome-stable"

  • @machine-code
    @machine-code 6 месяцев назад

    "Navigating frame was detached" :(((

  • @hellenribas2385
    @hellenribas2385 Год назад

    Excelent

  • @SparrowXD_real
    @SparrowXD_real 9 месяцев назад

    im getting a Timeout error

  • @ali27001
    @ali27001 14 часов назад

    Hİ Guys. it is work for me node v20 "puppeteer": "^19.7.2" (ı use same version with video) and and ı put port env on render and docker file EXPOSE 3000

  • @DevTips-zj4ur
    @DevTips-zj4ur Год назад

    Hi Avi, thank you for this tutorial. It was very helpful. One thing I've noticed is that I keep getting the errors "Cookie “__cf_bm” has been rejected for an invalid domain" and "Cookie “_cfuvid” has been rejected for an invalid domain" in the browser when I try to make an API call. It's strange because there are no errors in the OnRender logs, which is confusing. I'm not sure if this is caused by OnRender, but I was wondering if you or anyone else has encountered a similar issue?

    • @AviMamenko
      @AviMamenko  Год назад

      Look closely at the domain that the cookie is being set with. Could be as simple as example.com rather than www.example.com.

    • @DevTips-zj4ur
      @DevTips-zj4ur Год назад +1

      ​@@AviMamenko Thank you for the reply Avi! It turns out puppeter was being blocked by the website I wanted to scrape. In order to bypass this I installed puppeteer-page-proxy package and added a proxy server in browser args. Even though I can still see "Cookie “__cf_bm” and "Cookie “_cfuvid” warnings in the console, everything works like a charm!

  • @youdummy5928
    @youdummy5928 9 месяцев назад

    laura

  • @anabeatriz8835
    @anabeatriz8835 3 дня назад

    I got this error after request my scrape route:
    *npm ERR! path /usr/src/app*
    *npm ERR! command failed*
    *npm ERR! signal SIGTERM*
    *npm ERR! command sh -c tsx src/main.ts*
    I have *CMD [ "npx", "tsx", "src/main.ts" ]* on my dockerfile

  • @m4c1el
    @m4c1el 4 месяца назад

    hey! if this method doesn't work for you, try creating a .puppeteerrc.cjs file on the project root and add the following to it:
    const {join} = require('path');
    /**
    * @type {import("puppeteer").Configuration}
    */
    module.exports = {
    // Changes the cache location for Puppeteer.
    cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
    };
    sometimes, the "Chrome not found" error happens when the cache directory is incorrectly configured. this code configures it correctly. this worked for me, hope this helps :)

    • @victork7135
      @victork7135 3 месяца назад

      Hi I tried this but it doesn’t work. Can you help me real quick

  • @terrygamer8663
    @terrygamer8663 2 месяца назад +1

    have a problem "Browser was not found at the configured executablePath (/usr/bin/google-chrome-stable)", why?

    • @Toby-yz7wt
      @Toby-yz7wt Месяц назад

      having same issue, did you solve it?

    • @kacpermatlag9229
      @kacpermatlag9229 Месяц назад

      Try replace your dockerfile with this:
      FROM node:18-slim
      RUN apt-get update && \
      apt-get install -y \
      ca-certificates \
      fonts-liberation \
      libasound2 \
      libatk1.0-0 \
      libatk-bridge2.0-0 \
      libc6 \
      libcairo2 \
      libcups2 \
      libdbus-1-3 \
      libdrm2 \
      libexpat1 \
      libfontconfig1 \
      libgbm1 \
      libgcc1 \
      libglib2.0-0 \
      libgtk-3-0 \
      libnss3 \
      libpango-1.0-0 \
      libpangocairo-1.0-0 \
      libstdc++6 \
      libx11-6 \
      libx11-xcb1 \
      libxcb1 \
      libxcomposite1 \
      libxcursor1 \
      libxdamage1 \
      libxext6 \
      libxfixes3 \
      libxi6 \
      libxrandr2 \
      libxrender1 \
      libxshmfence1 \
      libxss1 \
      libxtst6 \
      lsb-release \
      xdg-utils \
      wget \
      --no-install-recommends && \
      rm -rf /var/lib/apt/lists/*
      WORKDIR /app
      COPY package*.json ./
      RUN npm install
      COPY . ./
      CMD ["node", "index.js"]

    • @kacpermatlag9229
      @kacpermatlag9229 Месяц назад

      Also set your browser params like that:
      await puppeteer.launch({
      headless: true,
      args: ['--no-sandbox', '--disable-setuid-sandbox']
      })

    • @ravebitchesrave
      @ravebitchesrave Месяц назад

      @@kacpermatlag9229 have you tested this?

    • @ravebitchesrave
      @ravebitchesrave Месяц назад

      @@Toby-yz7wt did you ever solve this?

  • @Dragon-mv6vy
    @Dragon-mv6vy 23 дня назад

    doesn't work