环境搭建:
visual studio:2017
python:v3.6.0(系统环境变量要加上python对应安装目录)
node:v13.14.0
npm:v6.14.4
依赖包:
"@electron/remote": "^2.0.10",
"electron-log": "^4.0.0",
"electron-store": "^5.1.0",
"electron-updater": "^4.3.5",
"ffi-napi": "^4.0.3",
"fs": "0.0.1-security",
"electron": "^11.0.0",
"electron-builder": "^22.9.1",
"electron-rebuild": "^3.2.9",
"node-sass": "^4.14.1"
提示:
1.依赖包下载后,打包客户端时若报fs/promises相关错误,找到错误提示里对应js文件里的require("fs/promises"),改成require("fs").promises
2.若下载依赖包报错,每次改完配置后,清除npm cache,删除node_modules文件夹,再重新下载依赖包