galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

Build fail Electron 3.0.8 platform=win32 arch=ia32 #402

Open leonetosoft opened 5 years ago

leonetosoft commented 5 years ago

Hello, congratulations on your work.

I am trying to make version 32 of my application electron, however I have error in the construction of the binary.

rebuilding native production dependencies platform=win32 arch=x64 (OK) The x64-generated executable works perfectly

rebuilding native production dependencies platform=win32 arch=ia32 (FAIL)

Error: C:\Program Files\nodejs\node.exe exited with code 1
Output:

> hummus@1.0.104 install C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus
> node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS

Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build=$EXTRA_NODE_PRE_GYP_FLAGS --module=C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus\binding\hummus.node --module_name=hummus --module_path=C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus\binding --napi_version=4 --node_abi_napi=napi --python=C:\Users\Leonardo\.windows-build-tools\python27\python.exe' (1)

Error output:
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.104/electron-v3.0-win32-ia32-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for hummus@1.0.104 and electron@3.0.8 (electron-v3.0 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Pre-built binaries not installable for hummus@1.0.104 and electron@3.0.8 (electron-v3.0 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error Connection closed while downloading tarball file 
Traceback (most recent call last):
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
    return gyp_main(args)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2025, in GenerateOutput
    version=msvs_version)
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 213, in __init__
    self.Write()
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 340, in Write
    f.close()
  File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\common.py", line 393, in close
    os.rename(self.tmp_path, filename)
WindowsError: [Error 183] N�o � poss�vel criar um arquivo j� existente
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build=$EXTRA_NODE_PRE_GYP_FLAGS" "--module=C:\\Users\\Leonardo\\nodejs\\upaki-desktop\\node_modules\\hummus\\binding\\hummus.node" "--module_name=hummus" "--module_path=C:\\Users\\Leonardo\\nodejs\\upaki-desktop\\node_modules\\hummus\\binding" "--napi_version=4" "--node_abi_napi=napi" "--python=C:\\Users\\Leonardo\\.windows-build-tools\\python27\\python.exe"
gyp ERR! cwd C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build=$EXTRA_NODE_PRE_GYP_FLAGS --module=C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus\binding\hummus.node --module_name=hummus --module_path=C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus\binding
--napi_version=4 --node_abi_napi=napi --python=C:\Users\Leonardo\.windows-build-tools\python27\python.exe' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.17763
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Leonardo\\nodejs\\upaki-desktop\\node_modules\\hummus\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "$EXTRA_NODE_PRE_GYP_FLAGS"
node-pre-gyp ERR! cwd C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\hummus
node-pre-gyp ERR! node -v v10.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hummus@1.0.104 install: `node-pre-gyp install --fallback-to-build $EXTRA_NODE_PRE_GYP_FLAGS`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hummus@1.0.104 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!     C:\Users\Leonardo\AppData\Roaming\npm-cache\_logs\2019-06-28T11_54_56_574Z-debug.log

    at ChildProcess.childProcess.once.code (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\builder-util\src\util.ts:254:14)
    at Object.onceWrapper (events.js:286:20)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
From previous event:
    at rebuild (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\out\util\yarn.js:239:18)
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\util\yarn.ts:20:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at installOrRebuild (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\out\util\yarn.js:68:17)
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:457:13
    at Generator.next (<anonymous>)
From previous event:
    at Packager.installAppDependencies (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:418:70)
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:368:20
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Packager.doBuild (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:344:39)
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:314:57
    at Generator.next (<anonymous>)
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\graceful-fs\graceful-fs.js:99:16
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\graceful-fs\graceful-fs.js:43:10
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
    at Packager._build (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:285:133)
    at C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:281:23
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\packager.ts:238:14)
    at build (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\app-builder-lib\src\index.ts:58:28)
    at build (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\src\builder.ts:227:10)
    at then (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\src\cli\cli.ts:42:48)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Object.args [as handler] (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\src\cli\cli.ts:42:48)
    at Object.runCommand (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\node_modules\yargs\lib\command.js:237:44)    at Object.parseArgs [as _parseArgs] (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\node_modules\yargs\yargs.js:1059:30)
    at Object.get [as argv] (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\node_modules\yargs\yargs.js:1000:21)
    at Object.<anonymous> (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\electron-builder\src\cli\cli.ts:25:28)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at findNodeScript.then.existing (C:\Users\Leonardo\nodejs\upaki-desktop\node_modules\npx\node_modules\libnpx\index.js:268:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! upaki-sync-ui@4.2.48 electron:windows: `npm run electron:serve-tsc && npm run build:prod && npx electron-builder build --windows`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the upaki-sync-ui@4.2.48 electron:windows 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\Leonardo\AppData\Roaming\npm-cache\_logs\2019-06-28T11_54_56_644Z-debug.log
The terminal process terminated with exit code: 1
julianhille commented 5 years ago

did you set npm_config_target_arch= and npm_config_arch to ia32?

leonetosoft commented 5 years ago

@julianhille This is configured within electron-builder.json, so at the time of creating the executables and installers it uses this file for creation parameters.

Defining:

"win": {

"icon": "icons/winico.ico",

"target": [

"portable",

{

"target": "nsis",

"arch": [

"x64",

"ia32"

]

}

]

}

I think it would resolve to make this binary available in the link that the compiler tries to download: https://hummus.s3-us-west-2.amazonaws.com/hummus/v1.0.104/electron-v3.0-win32-ia32-unknown. tar.gz

rbeeger commented 4 years ago

420 added ia32 pre-builts which are now available for version 1.0.105. So that should be fixed now.