Я пробую npm run linux для сборки QTGate-Desktop-Client из исходников. Но получить ошибку сборки и не удалось собрать:

$ npm run linux 

> conet@2.0.11 linux /home/user-name/tmp/QTGate-Desktop-Client-2.0.11
> electron-builder --linux

  • electron-builder version=20.38.5
  • loaded configuration file=package.json ("build" field)
  • writing effective config file=dist/builder-effective-config.yaml
  • rebuilding native production dependencies platform=linux arch=ia32
Error: /usr/bin/node exited with code 7
Output:

> raw-socket@1.6.2 install /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/raw-socket
> node-gyp rebuild


Error output:
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack TypeError: Cannot read property 'substring' of undefined
gyp ERR! stack     at Unpack.isValid [as filter] (/usr/share/node-gyp/lib/install.js:156:30)
gyp ERR! stack     at Unpack.[consumeHeader] (/usr/lib/nodejs/tar/lib/parse.js:134:48)
gyp ERR! stack     at Unpack.[consumeChunkSub] (/usr/lib/nodejs/tar/lib/parse.js:385:30)
gyp ERR! stack     at Unpack.[consumeChunk] (/usr/lib/nodejs/tar/lib/parse.js:362:30)
gyp ERR! stack     at Unpack.write (/usr/lib/nodejs/tar/lib/parse.js:309:25)
gyp ERR! stack     at Gunzip.ondata (_stream_readable.js:639:20)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Gunzip.emit (events.js:211:7)
gyp ERR! stack     at addChunk (_stream_readable.js:263:12)
gyp ERR! stack     at readableAddChunk (_stream_readable.js:250:11)
gyp ERR! System Linux 4.14.13
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/raw-socket
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! raw-socket@1.6.2 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the raw-socket@1.6.2 install 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!     /home/user-name/.npm/_logs/2019-01-30T04_32_39_614Z-debug.log

    at ChildProcess.childProcess.once.code (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/builder-util/src/util.ts:244:14)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
From previous event:
    at _rebuild (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/util/yarn.ts:179:5)
    at rebuild (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/out/util/yarn.js:163:19)
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/util/yarn.ts:20:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
    at _installOrRebuild (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/out/util/yarn.js:71:28)
    at installOrRebuild (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/out/util/yarn.js:55:28)
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:511:13
    at Generator.next (<anonymous>)
From previous event:
    at Packager.installAppDependencies (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:472:70)
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:420:20
    at Generator.next (<anonymous>)
From previous event:
    at Packager.doBuild (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:396:24)
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:366:57
    at Generator.next (<anonymous>)
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/graceful-fs/graceful-fs.js:111:16
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
    at Packager._build (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:335:133)
    at /home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:331:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
    at Packager.build (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/packager.ts:288:14)
    at build (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/app-builder-lib/src/index.ts:59:28)
    at build (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/electron-builder/src/builder.ts:227:10)
    at then (/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/electron-builder/src/cli/cli.ts:46:19)
    at <anonymous>
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! conet@2.0.11 linux: `electron-builder --linux`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the conet@2.0.11 linux 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!     /home/user-name/.npm/_logs/2019-01-30T04_32_39_729Z-debug.log

/home/user-name/.npm/_logs/2019-01-30T04_32_39_729Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'linux' ]
2 info using npm@5.8.0
3 info using node@v8.11.1
4 verbose run-script [ 'prelinux', 'linux', 'postlinux' ]
5 info lifecycle conet@2.0.11~prelinux: conet@2.0.11
6 info lifecycle conet@2.0.11~linux: conet@2.0.11
7 verbose lifecycle conet@2.0.11~linux: unsafe-perm in lifecycle true
8 verbose lifecycle conet@2.0.11~linux: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/user-name/tmp/QTGate-Desktop-Client-2.0.11/node_modules/.bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle conet@2.0.11~linux: CWD: /home/user-name/tmp/QTGate-Desktop-Client-2.0.11
10 silly lifecycle conet@2.0.11~linux: Args: [ '-c', 'electron-builder --linux' ]
11 silly lifecycle conet@2.0.11~linux: Returned: code: 1  signal: null
12 info lifecycle conet@2.0.11~linux: Failed to exec linux script
13 verbose stack Error: conet@2.0.11 linux: `electron-builder --linux`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid conet@2.0.11
15 verbose cwd /home/user-name/tmp/QTGate-Desktop-Client-2.0.11
16 verbose Linux 4.14.13
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "linux"
18 verbose node v8.11.1
19 verbose npm  v5.8.0
20 error code ELIFECYCLE
21 error errno 1
22 error conet@2.0.11 linux: `electron-builder --linux`
22 error Exit status 1
23 error Failed at the conet@2.0.11 linux script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

0