โก How to skip Chromium download in Puppeteer?
Time to save 120 MB of your disk space ๐

I am a full stack developer, YouTuber and blogger!
Search for a command to run...
Time to save 120 MB of your disk space ๐

I am a full stack developer, YouTuber and blogger!
Hey all ๐๐ Webhooks are a powerful tool that allow applications to communicate with each other in real-time. They are often used to send notifications or updates from one system to another without requiring manual intervention. If you know the bas...

Hey everyone! It's been a while since I wrote my last article. But here I am with another topic that might be informational to you ๐. This time I am writing about why you should avoid the onclick attribute in your HTML and JavaScript code. This ar...

โ What and Why Memoriez โ This is a very important question because it makes things clear as to why this app is needed. I built Memoriez because I honestly found it hard to write and maintain journal/diary entries daily. It's not easy to maintain a j...

Explained with a simple project

๐ Hey developers! This post is about how you can sort import statements in your JavaScript/TypeScript/React/Node etc projects easily with Prettier in VS Code when you format the code. https://www.youtube.com/watch?v=QQWgN0_gUxI What will you achieve...

If you're a Node.js developer and you've used Puppeteer for web scraping, you might have seen that it downloads Chromium whenever you install puppeteer.

Many of you people don't like to download an external web browser for this. You might have Chrome, Edge, Brave, or any other Chromium-based browser on your system so why not use that?

Whenever you install Puppeteer, it will first check for the environment variables listed below:

Read more on DevDocs: https://devdocs.io/puppeteer/index#environment-variables
We are interested in PUPPETEER_SKIP_CHROMIUM_DOWNLOAD and PUPPETEER_EXECUTABLE_PATH.
In your operating system, you have to set these two environment variables to these values ๐
| Key | Value |
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD | true |
| PUPPETEER_EXECUTABLE_PATH | { PATH_TO_CHROME_OR_CHROMIUM } |
Search this term Edit the system environment variables in Start Menu and open it

Click this button on the bottom right:

Click on the New button under System variables:

Enter the variable name and value as given below:
| Key | Value |
| PUPPETEER_SKIP_CHROMIUM_DOWNLOAD | true |
| PUPPETEER_EXECUTABLE_PATH | { PATH_TO_CHROME_OR_CHROMIUM } |
The simplest way to find the path to your browser's executable (on Windows) is to right-click the shortcut on the desktop, and click on Open file location.
In my case, I used Microsoft Edge so this was the path: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe

It'll take you to the file location and you can copy the path, and paste it into the environment variables.

Thanks for reading!
I hope you liked it! Comment down your thoughts! There is always room for improvement so let me know your suggestions!
Connect with me on my YouTube channel and my Twitter ๐
Until next time, keeping awesome โ๏ธ!