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

Поділитися
Вставка
  • Опубліковано 12 гру 2024

КОМЕНТАРІ • 125

  • @Ajdin87
    @Ajdin87 10 місяців тому +7

    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 10 місяців тому +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 10 місяців тому +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

  • @kanucu252
    @kanucu252 8 місяців тому +1

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

  • @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!

  • @jyk595
    @jyk595 8 місяців тому +1

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

  • @offilawNoone
    @offilawNoone 14 днів тому

    Very nice pace. No bs.

  • @cromuelbarut9859
    @cromuelbarut9859 6 місяців тому +1

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

  • @cseckler
    @cseckler 11 місяців тому

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

  • @AdityaSingh-ui4tr
    @AdityaSingh-ui4tr 10 місяців тому

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

  • @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!

  • @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!!!!!!

  • @dev_navdeep
    @dev_navdeep Рік тому +1

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

  • @webtotheflow
    @webtotheflow 10 місяців тому

    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 🙏🏾

  • @buildwithdamian
    @buildwithdamian 3 місяці тому

    Thanks for this one. Saved me hours!

  • @chrisbarber7291
    @chrisbarber7291 7 місяців тому

    You freaking saved me with this, thank you!!

  • @gerkim62
    @gerkim62 Рік тому +1

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

  • @mehdiahmed7836
    @mehdiahmed7836 11 місяців тому

    amazing tutorial ! clear and concise ,thank you sir

  • @juninhobh96
    @juninhobh96 Рік тому

    Nice work man! Keep going!

  • @anbuparadox
    @anbuparadox Рік тому

    This tutorial was godsend. Great work brother.

  • @lovewithcompetitiveprogramming

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

  • @MatheusHugo
    @MatheusHugo 4 місяці тому

    it works! thanks man

  • @AntoniKiddcodePutra
    @AntoniKiddcodePutra Рік тому

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

  • @anabeatriz8835
    @anabeatriz8835 Місяць тому

    13:44 how do u know this path?

  • @EWANALLISON
    @EWANALLISON 11 місяців тому

    This helped a bunch, thanks!

  • @oureducations
    @oureducations Рік тому +2

    Thanks for explain easy understanding

  • @terminal9191
    @terminal9191 11 місяців тому +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 .

  • @philippschrittwieser3409
    @philippschrittwieser3409 Рік тому

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

  • @DeveloperSerean
    @DeveloperSerean 5 місяців тому +1

    You are my hero 🎊🎊

  • @juliushernandez9855
    @juliushernandez9855 8 місяців тому +1

    can i use puppeteer-extra instead of puppeteer?

  • @miguelviloria4596
    @miguelviloria4596 Рік тому +1

    great video, you have a new suscriber

  • @enteren7716
    @enteren7716 2 місяці тому +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?

  • @benalt78
    @benalt78 8 місяців тому

    outstanding video!

  • @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 11 місяців тому

      Why did you have to remove that?

  • @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?

  • @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.

  • @edisonmondal2798
    @edisonmondal2798 3 місяці тому

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

  • @nicoTheGreatswordUser
    @nicoTheGreatswordUser Рік тому +1

    Thanks for this !

  • @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 11 місяців тому

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

  • @shraj340
    @shraj340 6 місяців тому +3

    For nextJS and Vercel

  • @AryanRaj-zt6cq
    @AryanRaj-zt6cq Рік тому

    You saved my time. Thanks man❤

  • @kathanmehtaa
    @kathanmehtaa 9 місяців тому

    banger video dudeeee

  • @r7verape
    @r7verape 8 місяців тому

    THE GOAT!!!!

  • @Daianagee
    @Daianagee Рік тому

    This is life changing thank you good sir

  • @Abhishekkumar-yq1cw
    @Abhishekkumar-yq1cw 2 місяці тому

    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

  • @spy702007
    @spy702007 10 місяців тому

    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

  • @schreiandrej
    @schreiandrej Місяць тому

    Very usefull! Thanks!

  • @chibuikem_nick
    @chibuikem_nick Рік тому

    This was very helpful. Thank you 👍

  • @shethparshv
    @shethparshv 10 днів тому

    Can we use that for headless false ??😊

  • @kameshrajput7193
    @kameshrajput7193 Рік тому +2

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

  • @bonsayeb9620
    @bonsayeb9620 Місяць тому

    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 Місяць тому

      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 8 місяців тому

    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?

  • @victork7135
    @victork7135 5 місяців тому

    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  5 місяців тому +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 5 місяців тому

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

  • @aguest5394
    @aguest5394 9 місяців тому

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

  • @sohamsarkar911
    @sohamsarkar911 Рік тому

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

  • @phamhoangtam1058
    @phamhoangtam1058 Рік тому

    thanks a alot for this videos, it work with me

  • @miguelvelascodev
    @miguelvelascodev 9 місяців тому

    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 9 місяців тому

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

  • @daviesn-y4w
    @daviesn-y4w Рік тому

    Thanks Avi!

  • @euGENIUS-ua
    @euGENIUS-ua 2 місяці тому +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 Місяць тому

      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...

  • @sonecajones
    @sonecajones Рік тому

    Thank u! It worked!

  • @luisenriquecarmenatemorale4469

    Just perfect !!!!!!

  • @machine-code
    @machine-code 7 місяців тому

    "Navigating frame was detached" :(((

  • @harimzermeno4203
    @harimzermeno4203 Рік тому +5

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

    • @cseckler
      @cseckler 11 місяців тому

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

    • @hobbosen-jz4pq
      @hobbosen-jz4pq 10 місяців тому

      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 2 місяці тому

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

  • @EmadAbuAljazer
    @EmadAbuAljazer 11 місяців тому

    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?

  • @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?

  • @ljohnso16
    @ljohnso16 6 днів тому

    render blocked this. it wont let me make the web service

  • @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 11 місяців тому +1

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

  • @УрошТомић-у4ф
    @УрошТомић-у4ф Рік тому +1

    What if you are generating pdf files with Puppeteer?

    • @gerkim62
      @gerkim62 Рік тому

      I think it should work as well

  • @verdientflash7308
    @verdientflash7308 Рік тому

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

  • @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()

  • @mvmclx5622
    @mvmclx5622 Рік тому

    Thanks!

  • @abhaygohel298
    @abhaygohel298 8 місяців тому

    thanks bro

  • @nonyoo
    @nonyoo 7 місяців тому

    Thanks!!!!

  • @SparrowXD_real
    @SparrowXD_real 11 місяців тому

    im getting a Timeout error

  • @refreshing_morning
    @refreshing_morning 8 місяців тому

    thank youuuu

  • @hellenribas2385
    @hellenribas2385 Рік тому

    Excelent

  • @ali27001
    @ali27001 Місяць тому

    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 11 місяців тому

    laura

  • @terrygamer8663
    @terrygamer8663 3 місяці тому +1

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

    • @Toby-yz7wt
      @Toby-yz7wt 2 місяці тому

      having same issue, did you solve it?

    • @kacpermatlag9229
      @kacpermatlag9229 2 місяці тому

      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 2 місяці тому

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

    • @ravebitchesrave
      @ravebitchesrave 2 місяці тому

      @@kacpermatlag9229 have you tested this?

    • @ravebitchesrave
      @ravebitchesrave 2 місяці тому

      @@Toby-yz7wt did you ever solve this?

  • @anabeatriz8835
    @anabeatriz8835 Місяць тому

    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 5 місяців тому

    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 5 місяців тому

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

  • @Dragon-mv6vy
    @Dragon-mv6vy 2 місяці тому +2

    doesn't work

  • @MuhammadFarisAli-u7g
    @MuhammadFarisAli-u7g 21 день тому

    thanksssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss for saving me from headache 🔥🔥🌌🌌