gpt4 book ai didi

reactjs - 错误 : Failed to download Chromium r686378! 设置 "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD"环境变量以跳过下载

转载 作者:行者123 更新时间:2023-12-03 18:31:33 28 4
gpt4 key购买 nike

我正在尝试在 ubuntu 18 中使用此命令 'sudo npm install --save-dev react-snap' 安装 react-snap 它给了我错误

ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.

搜索后,我将获得运行此命令的解决方案
sudo npm install -g puppeteer --unsafe-perm=true --allow-root

仍然运行此命令后,我面临此错误,我的 react 版本是 16.8
    ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@1.20.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@1.20.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

最佳答案

最好的方法是导出默认环境变量 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD

PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true yarn add puppeteer or
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install puppeteer

关于reactjs - 错误 : Failed to download Chromium r686378! 设置 "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD"环境变量以跳过下载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59088731/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com