场景
git clone https://github.com/jo-inc/camofox-browser以后,执行命令npm install && npm start,npm install过程会下载npm依赖及camoufox
但因为camoufox下载极慢,采用手动下载camofox方式
实际解决方式
设置永久环境变量vim ~/.bashrc,添加内容export CAMOUFOX_INSTALL_DIR=/home/Georege/tools/camoufox_browser
迅雷或者其他快速下载工具,打开https://github.com/daijro/camoufox/releases选择合适版本,比如此时我下载的最新版本v152.0.4-beta.28,https://github.com/daijro/camoufox/releases/download/v152.0.4-beta.28/camoufox-152.0.4-beta.28-lin.x86_64.zip
将下载的zip解压到指定目录/home/Georege/tools/camoufox_browser,unzip camoufox-152.0.4-beta.28-lin.x86_64.zip -d /home/Georege/tools/camoufox_browser
注意,还有一个额外操作:
cat > /home/George/tools/camoufox_browser/version.json <<EOF
{
"version": "152.0.4-beta.28",
"product": "camoufox"
}
EOF然后回到原camofox-browser项目
执行以下命令
npm install --ignore-scripts
npm start
即可正常启动camofox-browser项目