Tag Archives: ~1\AppData\Local\Temp\twc8ODN\0messages.nsh” Error in script “” on line 75 aborting creation process

!include: could not find: “C:\Users\Letsgo~1\AppData\Local\Temp\t-wc8ODN\0-messages.nsh” Error in script “” on line 75 — aborting creation process

error message

ExecError: C:\Users\Letsgo~1\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.2\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE       
Output:
Command line defined: "APP_ID=com.electron.vue-electron"
Command line defined: "APP_GUID=d5d114ea-3696-596a-b4ae-77f8de80b0a0"
Command line defined: "UNINSTALL_APP_KEY=d5d114ea-3696-596a-b4ae-77f8de80b0a0"
Command line defined: "PRODUCT_NAME=vue-electron"
Command line defined: "PRODUCT_FILENAME=vue-electron"
Command line defined: "APP_FILENAME=vue-electron"
Command line defined: "APP_DESCRIPTION="
Command line defined: "VERSION=0.1.0"
Command line defined: "PROJECT_DIR=E:\TestSpace\VsCode\vue-electron"
Command line defined: "BUILD_RESOURCES_DIR=E:\TestSpace\VsCode\vue-electron\build"
Command line defined: "APP_PACKAGE_NAME=vue-electron"
Command line defined: "APP_64=E:\TestSpace\VsCode\vue-electron\dist_electron\vue-electron-0.1.0-x64.nsis.7z"
Command line defined: "APP_64_NAME=vue-electron-0.1.0-x64.nsis.7z"
Command line defined: "APP_64_HASH=6C74864EC747628F4E9BDD2B96E6491817771A972106EFF0B3D506B5D714CA7A5DFA59EFC6C66FA1541954B53670414EF7105C99F311129B24640FCCAEE4DA89"
Command line defined: "APP_INSTALLER_STORE_FILE=vue-electron-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "SHORTCUT_NAME=vue-electron"
Command line defined: "UNINSTALL_DISPLAY_NAME=vue-electron 0.1.0"
Command line defined: "ESTIMATED_SIZE=185931"
Command line defined: "COMPRESS=auto"
Command line defined: "BUILD_UNINSTALLER"
Command line defined: "UNINSTALLER_OUT_FILE=E:\TestSpace\VsCode\vue-electron\dist_electron\__uninstaller-nsis-vue-electron.exe"
Processing config: C:\Users\�����ǵ���ȥ\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4.2\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Error output:
!include: could not find: "C:\Users\Letsgo~1\AppData\Local\Temp\t-wc8ODN\0-messages.nsh"
Error in script "<stdin>" on line 75 -- aborting creation process

    at ChildProcess.<anonymous> (E:\TestSpace\VsCode\vue-electron\node_modules\builder-util\src\util.ts:250:14)
    at Object.onceWrapper (events.js:520:26)
    at ChildProcess.emit (events.js:400:28)
    at ChildProcess.cp.emit (E:\TestSpace\VsCode\vue-electron\node_modules\builder-util\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  exitCode: 1,
  alreadyLogged: false,
  code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}
npm ERR! code ELIFECYCLE

problem

Chinese appears in the path

Letsgo~1

Open node_Module/APP builder lib/out/targets/NSIS/nsisitarget.js file, add the required parameters to the executemakensis method.

//node_module/app-builder-lib/out/targets/nsis/NsisTarget.js
async executeMakensis(defines, commands, script) {
    const args = this.options.warningsAsErrors === false ?[] : ["-WX"];
    //Add
    args.push("-INPUTCHARSET", "UTF8");
    //END
    for (const name of Object.keys(defines)) {
        const value = defines[name];

        if (value == null) {
            args.push(`-D${name}`);
        } else {
            args.push(`-D${name}=${value}`);
        }
    }
}