提示:Application entry file "main.js" does not exist
解决: package.json中的build模块,添加files
"files": [
"./index.html",
"./main.js",
"./package.json",
],
提示:Application entry file "build/electron.js" does not exist
解决: package.json中的build模块添加:
extends: null
网络原因导致没法下载依赖包(win10)
1.electron-v2.0.18-win32-x64.zip
2.SHASUMS256.txt-2.0.18
3.winCodeSign-2.4.0
4.nsis-3.0.3.2
5.nsis-resources-3.3.0
不同版本所需要包不同,应该按提示手动下载 如: https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z
然后放到指定目录 参考
打包后运行exe(win10)
提示can not find module 'electron-is-dev' can not find module 'devtron'
解决:dependencies添加electro