PUPPETEER_DOWNLOAD_HOST | ATLASSC.NET
Skip to main content
/// .DATA.FRAGMENT_20200102

PUPPETEER_DOWNLOAD_HOST

1 minAuthor: Z.SHINCHVEN

puppeteer 是一个 NodeJS 的 Chrome headless API,安装的时候会 bundle 一个Chromium。如果你很不幸身在大中华局域网内,可能无法顺利下载Chromium。

所幸官方提供了环境变量配置,可以设置一个镜像地址来下载Chromium。

配置文件中添加变量

PUPPETEER_DOWNLOAD_HOST=https://storage.googleapis.com.cnpmjs.org

命令行中使用变量

npx cross-env PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors/ npm install puppeteer --save
RackNerd Billboard Banner
Share node:
/// .RELATED.DATA_STREAMSShared tags

Related posts

Scanning_database_for_correlations…

/// .UPLINK.SUBSCRIBE

Keep your deck synced with every new transmission from ATLASSC.NET. Subscribe over RSS or Atom, or wire the whole archive straight into your AI assistant with the MCP server.