0

I have an error when I build my electron app npm run dist but I didn't found a solution that resolve it.

Command line defined: "COMPRESS=auto" Command line defined: "BUILD_UNINSTALLER" Command line defined: "UNINSTALLER_OUT_FILE=C:\laragon\www\app\dist\.__uninstaller-nsis-App_App.exe" Processing config: C:\Users\User\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.3.2\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 60 Error in script "<stdin>" on line 112 -- aborting creation process at ChildProcess.<anonymous> (C:\laragon\www\app\node_modules\builder-util\src\util.ts:244:14) at Object.onceWrapper (events.js:288:20) at ChildProcess.emit (events.js:200:13) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dist: `build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] dist script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-11-04T10_47_57_428Z-debug.log 

The content of the log file:

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli 'C:\\laragon2\\bin\\nodejs\\node-v12\\node.exe', 1 verbose cli 'C:\\laragon2\\bin\\nodejs\\node-v12\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'dist' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'predist', 'dist', 'postdist' ] 5 info lifecycle [email protected]~predist: [email protected] 6 info lifecycle [email protected]~dist: [email protected] 7 verbose lifecycle [email protected]~dist: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~dist: PATH: C:\laragon2\bin\nodejs\node-v12\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin; 9 verbose lifecycle [email protected]~dist: CWD: C:\laragon\www\app 10 silly lifecycle [email protected]~dist: Args: [ '/d /s /c', 'build' ] 11 silly lifecycle [email protected]~dist: Returned: code: 1 signal: null 12 info lifecycle [email protected]~dist: Failed to exec dist script 13 verbose stack Error: [email protected] dist: `build` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\laragon2\bin\nodejs\node-v12\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16) 13 verbose stack at EventEmitter.emit (events.js:200:13) 13 verbose stack at ChildProcess.<anonymous> (C:\laragon2\bin\nodejs\node-v12\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:200:13) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) 14 verbose pkgid [email protected] 15 verbose cwd C:\laragon\www\app 16 verbose Windows_NT 10.0.18363 17 verbose argv "C:\\laragon2\\bin\\nodejs\\node-v12\\node.exe" "C:\\laragon2\\bin\\nodejs\\node-v12\\node_modules\\npm\\bin\\npm-cli.js" "run" "dist" 18 verbose node v12.5.0 19 verbose npm v6.9.0 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] dist: `build` 22 error Exit status 1 23 error Failed at the [email protected] dist script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] 

I tried to clean npm caches, remove all modules and reinstall it, delete electron-builder caches but nothing happened.

I tested to build the same project in other computer and it works fine.

Does anyone have a solution to my problem?

Thank in advance

1 Answer 1

2

If anyone has a similar error I have found the problem: it must not have unicode characters in the electron builder cache path. In my case it was my windows user session.

To change electron cache path:

export ELECTRON_BUILDER_CACHE=C:\Temp 

And run npm run dist or yarn dist

Hope this answer can help someone in the future.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.