Puppeteer Error: Chromium revision is not downloaded

前端 未结 8 507
谎友^
谎友^ 2021-02-04 01:31

I used npm i puppeteer as stated in the Documentation and I\'m getting the following error:

(node:2066) UnhandledPromiseRejectionWarning: Error: Chr

相关标签:
8条回答
  • 2021-02-04 01:55

    In my case, it worked after deleting node_modules folder and package-lock.json file and running npm install again.

    0 讨论(0)
  • 2021-02-04 02:01

    I solved it like this:

    const browser = await puppeteer.launch({ executablePath: "./node_modules/puppeteer/.local-chromium/win64-656675/chrome-win/chrome.exe"});

    note the win64-656675 in the path, if you're on a different operating system you will need to point to the appropriate folder.

    puppeteer version: 1.16.0

    0 讨论(0)
提交回复
热议问题