ERROR: Failed to download Chromium r609904! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable t...

https://github.com/GoogleChrome/puppeteer/issues/1597

使用国内Chromium源
https://npm.taobao.org/mirrors

# // > https://npm.taobao.org/mirrors
# // export PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors
# // set PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors

npm config set puppeteer_download_host=https://npm.taobao.org/mirrors
npm i puppeteer

或者用淘宝的cnpm 安装,自动使用国内源

npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm i puppeteer

还可以手动下载Chromium文件,解压后放在本地
https://npm.taobao.org/mirrors/chromium-browser-snapshots/

cnpm/cnpmjs.org#1246
storage.googleapis.com 整站代理:https://storage.googleapis.com.cnpmjs.org
https://npm.taobao.org/mirrors
cnpm/binary-mirror-config/package.json

    原文作者:睡眠不足的瞌睡虫
    原文地址: https://www.jianshu.com/p/d69b1d8bc2a6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞