![]() cache directory of your project directory and figure out the full path.Īdd the executablePath: of the Chrome executable to your script: const browser = await puppeteer. Puppeteer will download a recent version of Chromium and will require a lot of space (170MB Mac, 282MB Linux, 280MB Win). You can find the list on the Troubleshooting page.įind Chrome inside the. Download and install Express, Axios, and Puppeteer using NPM. ![]() ![]() On Unix, make sure all the necessary dependencies are installed. Here you can basically hit enter until the init is done. To download Microsoft Edge, go to Download Microsoft Edge Insider Channels. ![]() Now Chrome will be stored inside the project directory in the. Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol. This will change the default location of Chrome to your project directory. To skip the download, download into another path, or download a different browser, see Environment variables. Changes the cache location for Puppeteer.ĬacheDirectory: join(_dirname, '.cache', 'puppeteer'), When you install Puppeteer, it downloads a recent version of Chromium (170MB Mac, 282MB Linux, 280MB Win) that is guaranteed to work with the API. puppeteer -unsafe-permtrue -allow-root > puppeteer10.0. Sign up for a free GitHub account to open an issue and contact its maintainers and the community. The 3rd point in Amr Hussein's answer helped me to solve a similar Problem where I got the following error, whenever I executed my script outside the project directory: throw new Error(`Could not find Chromium (rev. when installing Puppeteer using npm install puppeteer, it does not download a recent version of Chromium as it is mentioned in the documentation.
0 Comments
Leave a Reply. |