Electron-builder: node 8 breaks on Windows

Created on 2 Jun 2017  Â·  8Comments  Â·  Source: electron-userland/electron-builder


  • Version:

"electron-builder": "18.3.5",
"electron-builder-squirrel-windows": "18.3.0",

  • Target:
    Squirrel


    Trying to build this https://github.com/Stanzilla/hyper/tree/dev-updates on Windows 8.1 / node 8 / npm 5.0.1 always fails with
Building Squirrel.Windows for arch x64
âš   Cannot delete temporary dir "C:\Users\Benjamin\AppData\Local\Temp\electron-builder-Z6a4O4": Error: ENOTEMPTY: directory n
ot empty, rmdir 'C:\Users\Benjamin\AppData\Local\Temp\electron-builder-Z6a4O4'
    at Object.fs.rmdirSync (fs.js:838:18)
    at rmkidsSync (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\fs-extra-p\node_modules\fs-extra\lib\remove\rimraf.
js:292:11)
    at rmdirSync (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\fs-extra-p\node_modules\fs-extra\lib\remove\rimraf.j
s:281:7)
    at rimrafSync (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\fs-extra-p\node_modules\fs-extra\lib\remove\rimraf.
js:252:7)
    at process.cleanup (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-util\src\tmp.ts:36:13)
    at emitOne (events.js:115:13)
    at process.emit (events.js:210:7)
    at process.emit (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\source-map-support\source-map-support.js:430:21)
    at process._fatalException (bootstrap_node.js:329:26)
Unhandled rejection Error: ENOENT: no such file or directory, stat 'C:\Users\Benjamin\AppData\Local\Temp\electron-builder-Z6a
4O4\0-1-Update.exe'
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\src\squirrelPack.ts:108:9
    at Generator.next (<anonymous>)
From previous event:
    at pack (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\out\squirrelPack.js:133
:22)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\src\squirrelPack.ts:82:5
From previous event:
    at buildInstaller (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\out\squirrelP
ack.js:62:21)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\src\squirrelWindows.ts:37:11
    at Generator.next (<anonymous>)
From previous event:
    at SquirrelWindowsTarget.build (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\
out\squirrelWindows.js:74:11)
    at postAsyncTasks.push.default.map.it (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\platfo
rmPackager.ts:106:85)
From previous event:
    at WinPackager.packageInDistributableFormat (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\
platformPackager.ts:106:41)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\platformPackager.ts:102:10
    at Generator.next (<anonymous>)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)
From previous event:
    at WinPackager.pack (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\platformPackager.js:169:
11)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\packager.ts:257:24
    at Generator.next (<anonymous>)
    at xfs.stat (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\fs-extra-p\node_modules\fs-extra\lib\mkdirs\mkdirs.js
:56:16)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\graceful-fs\polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
    at Packager.doBuild (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\packager.js:379:11)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\packager.ts:170:52
    at Generator.next (<anonymous>)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)
From previous event:
    at Packager.build (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\packager.js:274:11)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\builder.ts:198:33
    at Generator.next (<anonymous>)
From previous event:
    at build (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\builder.js:70:21)
    at Object.<anonymous> (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\cli\build-cli.js:71:41
)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

Error: ENOENT: no such file or directory, stat 'C:\Users\Benjamin\AppData\Local\Temp\electron-builder-Z6a4O4\0-1-Update.exe'
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\src\squirrelPack.ts:108:9
    at Generator.next (<anonymous>)
From previous event:
    at pack (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\out\squirrelPack.js:133
:22)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\src\squirrelPack.ts:82:5
From previous event:
    at buildInstaller (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\out\squirrelP
ack.js:62:21)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\src\squirrelWindows.ts:37:11
    at Generator.next (<anonymous>)
From previous event:
    at SquirrelWindowsTarget.build (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder-squirrel-windows\
out\squirrelWindows.js:74:11)
    at postAsyncTasks.push.default.map.it (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\platfo
rmPackager.ts:106:85)
From previous event:
    at WinPackager.packageInDistributableFormat (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\
platformPackager.ts:106:41)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\platformPackager.ts:102:10
    at Generator.next (<anonymous>)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)
From previous event:
    at WinPackager.pack (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\platformPackager.js:169:
11)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\packager.ts:257:24
    at Generator.next (<anonymous>)
    at xfs.stat (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\fs-extra-p\node_modules\fs-extra\lib\mkdirs\mkdirs.js
:56:16)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\graceful-fs\polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
    at Packager.doBuild (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\packager.js:379:11)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\packager.ts:170:52
    at Generator.next (<anonymous>)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
    at processImmediate [as _immediateCallback] (timers.js:733:5)
From previous event:
    at Packager.build (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\packager.js:274:11)
    at C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\src\builder.ts:198:33
    at Generator.next (<anonymous>)
From previous event:
    at build (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\builder.js:70:21)
    at Object.<anonymous> (C:\Users\Benjamin\Documents\VCS\Git\hyper\node_modules\electron-builder\out\cli\build-cli.js:71:41
)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
error Command failed with exit code 4294967295.
Squirrel.Windows pending because of dependency

Most helpful comment

@black-snow Thanks for maintaining issues :) Without such pings/help it will be not touched/fixed :)

All 8 comments

It works with node 7.10 though!

Have you tried removing node_modules and npm i the whole thing again after upgrading to node v8.0+? That fixed issues I had.

yeah, same issue

Sadly, I can't test Win8. Have you tried debugging it yourself? What files are still lingering inside "C:\Users\Benjamin\AppData\Local\Temp\electron-builder-***?

Squirrel.Windows 1.7.0 doesn't use ancient buggy and strange zip implementation anymore. It will allows us to get rid of npm archiver and use 7za as we do in all other targets. As Squirrel.Windows target in the maintenance mode only, I cannot promise that I will do this task soon, but I hope this or next week. So, this issue will be obsolete.

@black-snow Thanks for maintaining issues :) Without such pings/help it will be not touched/fixed :)

@black-snow it was empty

Should be fixed by latest node release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JohnWeisz picture JohnWeisz  Â·  3Comments

omarkilani picture omarkilani  Â·  3Comments

iklemm picture iklemm  Â·  3Comments

AidanNichol picture AidanNichol  Â·  3Comments

NPellet picture NPellet  Â·  3Comments