报错信息:
Error: C:\Users\***\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\Bin\makensis.exe exited with code 1
Output:
Command line defined: "APP_ID=com.baidu.app"
Command line defined: "APP_GUID=fb00ccb0-0875-5f26-8d91-d8b573c5a860"
Command line defined: "PRODUCT_NAME=Baidu"
Command line defined: "PRODUCT_FILENAME=Baidu"
Command line defined: "APP_FILENAME=Baidu"
Command line defined: "APP_DESCRIPTION=An Baidu Project"
Command line defined: "VERSION=1.0.1"
Command line defined: "PROJECT_DIR=D:\Code\Demo\Vue\Voice\App"
Command line defined: "BUILD_RESOURCES_DIR=D:\Code\Demo\Vue\Voice\App\build"
Command line defined: "MUI_ICON=D:\Code\Demo\Vue\Voice\App\build\icons\icon.ico"
Command line defined: "MUI_UNICON=D:\Code\Demo\Vue\Voice\App\build\icons\icon.ico"
Command line defined: "APP_64=D:\Code\Demo\Vue\Voice\App\build\app-1.0.1-x64.nsis.7z"
Command line defined: "APP_64_NAME=app-1.0.1-x64.nsis.7z"
Command line defined: "APP_64_HASH=E7282FF7FF275CAB95B8BF3F3ED64590309B41E0DA7E72B99F6E4890CD63AAB68B165056C0BA444A0010711A388CB985704F1BFAB188E8155ACACBB370DB2671"
Command line defined: "COMPANY_NAME=Baidu"
Command line defined: "APP_INSTALLER_STORE_FILE=Baidu\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "MULTIUSER_INSTALLMODE_ALLOW_ELEVATION"
Command line defined: "INSTALL_MODE_PER_ALL_USERS_REQUIRED"
Command line defined: "allowToChangeInstallationDirectory"
Command line defined: "UNINSTALL_DISPLAY_NAME=ShineTech 1.0.1"
Command line defined: "MUI_WELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "MUI_UNWELCOMEFINISHPAGE_BITMAP=${NSISDIR}\Contrib\Graphics\Wizard\nsis3-metro.bmp"
Command line defined: "UNINSTALLER_ICON=D:\Code\Demo\Vue\Voice\App\build\icons\icon.ico"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=D:\Code\Demo\Vue\Voice\App\build\.__uninstaller-nsis-app.exe"
Processing config: C:\Users\***\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\nsisconf.nsh
Processing script file: "<stdin>" (ACP)
Error output:
Plugin not found, cannot call UAC::_
Error in macro _UAC_MakeLL_Cmp on macroline 2
Error in macro _UAC_IsInnerInstance on macroline 1
Error in macro _If on macroline 9
Error in macro FUNCTION_INSTALL_MODE_PAGE_FUNCTION on macroline 2
Error in macro PAGE_INSTALL_MODE on macroline 17
!include: error in script: "assistedInstaller.nsh" on line 57
Error in script "<stdin>" on line 97 -- aborting creation process
at ChildProcess.<anonymous> (D:\Code\Demo\Vue\Voice\App\node_modules\builder-util\src\util.ts:241:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
原因一:
用户名或者路径存在中文
解决办法:
更改为英文路径,或者尝试修改中文用户名(具体百度)
原因二:
从 github 下载 electron-builder cache 缓存出现错误或者未知异常
解决办法:
删除 C:\Users\**\AppData\Local\electron-builder\cache 下所有文件,重新打包
如果请求时提示 Error: connect ETIMEDOUT 140.82.113.3:443,说明请求超时,可以自行下载文件放到本地指定位置,并解压,具体教程参考:https://blog.csdn.net/muyoufansem/article/details/115068814文章来源:https://www.toymoban.com/news/detail-627902.html
PS:如果上述两个办法都没有解决你的问题,欢迎从 https://github.com/electron-userland/electron-builder/issues/1850 里面查找答案
————————————————
版权声明:本文为CSDN博主「蜡笔小新历险记」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/muyoufansem/article/details/115400710文章来源地址https://www.toymoban.com/news/detail-627902.html
到了这里,关于electron-builder 打包 exe 报错 Error output: Plugin not found, cannot call UAC::_的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!