跳转至

electron编译过程中遇到的问题

1. 系统找不到文件 D:\chrome\depot_tools\python3_bin_reldir.txt

Done

如果出现这个问题,去掉DEPOT_TOOLS_UPDATE环境变量

2. warning: subprocess '"git.bat" "fetch" "--prune"

Question

warning: subprocess '"git.bat" "fetch" "--prune" "origin" "+refs/heads/:refs/heads/"' in ... failed; will retry after a short nap

Done

因为网络波动或者vpn的不稳定,就会出现上面的警告,出现警告后,脚本会自动重试,如果重试了几回都失败了,那脚本就会退出,这个时候,我们检查下vpn,切换下线路,确保网络的稳定,然后再次执行拉取的命令,这个时候我们设置的git缓存就会起到很大的作用。

3. No module named win32file

Question

python ImportError: No module named win32file

Done
python -m pip install pywin32

4. UnicodeDecodeError

Question

Done

D:\chrome\depot_tools\bootstrap\bootstrap.py的107行,添加代码,encoding='utf-8',如下:

5. subprocess CalledProcessError

Question

Done

根据图中的具体错误来看,是执行python script/lib/npm.py install失败,查看npm.py文件,可以看到需要执行npm.cmd,显然安装nodejs并设置环境变量可以解决

6. visual studio not found

Question

Done

手动安装visual studio 2017,并设置环境变量vs2017_install

set vs2017_install=F:\visual studio\Microsoft Visual Studio\2017\Community

未完待续。。。


本文总阅读量
回到页面顶部