evshiron / nwjs-builder

https://www.npmjs.com/package/nwjs-builder
76 stars 12 forks source link

nwjs builder not able to build win32 non sdk flavour applications #65

Closed ayush191992 closed 7 years ago

ayush191992 commented 7 years ago

When I am trying to build non sdk flavors application using below command

nwb nwbuild -v 0.19.4 -p win32 ./Node_JS_Project

I am getting below error

{ version: 'v0.19.4', flavor: 'normal', targets: [ [ 'win', 'x86' ] ], path: './CommonUI_Framework_022317' } binary-nwjs-v0.19.4-win-ia32.zip [--------------------] 52.82KB/s 932.28s { Error: read ECONNRESET at exports._errnoException (util.js:1022:11) at TCP.onread (net.js:569:26) code: 'ECONNRESET', errno: 'ECONNRESET', sysca ll: 'read' }

It is not able to download the binaries while giving build command bit it seems to work for other flavors like win64,linux64,linux32 .

Manually downloading the binaries for the version and building for win32 platform works.

Please can any help any one in this regard.

evshiron commented 7 years ago

Why not add -m https://npm.taobao.org/mirrors/nwjs/ option and give it a chance?

ayush191992 commented 7 years ago

@evshiron
I have tried using below command

nwb nwbuild -v 0.19.4 -p win32 -m https://npm.taobao.org/mirrors/nwjs/ ./Node_JS_Project

But got below error

Error: ERROR_STATUS_NOT_OK at _callee2$ (C:\Users\ayushgupta\AppData\Roaming\npm\node_modules\nwjs-buil der\node_modules\nwjs-download\lib\util.js:265:68) at tryCatch (C:\Users\ayushgupta\AppData\Roaming\npm\node_modules\nwjs-build er\node_modules\regenerator-runtime\runtime.js:64:40) at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\ayushgupta\AppDa ta\Roaming\npm\node_modules\nwjs-builder\node_modules\regenerator-runtime\runtim e.js:299:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\U sers\ayushgupta\AppData\Roaming\npm\node_modules\nwjs-builder\node_modules\regen erator-runtime\runtime.js:116:21) at Immediate. (C:\Users\ayushgupta\AppData\Roaming\npm\node_modul es\nwjs-builder\node_modules\node-async-flow\lib\index.js:24:26) at runCallback (timers.js:651:20) at tryOnImmediate (timers.js:624:5) at processImmediate [as _immediateCallback] (timers.js:596:5)

May you give some feedback

evshiron commented 7 years ago

Hmm. I failed to fetch versions.json due to network issues but succeeded the download, while in your case the download failed, which shouldn't happen.

The project hasn't been updated for a long time and reading the trace is quite a pain. I will put some time into it recently. Before that please stick with your workaround. Sorry for the inconvenience.

ayush191992 commented 7 years ago

Thanks for your help. Please reply when you have solution for this

evshiron commented 7 years ago

Can you please try some more times, as there is no logical difference between downloading for different platforms. All errors mentioned are related to the download server (or the mirror), not nwjs-builder itself I am afraid.

ayush191992 commented 7 years ago

@evshiron I have tried in 2-3 systems and tried in machine having x86 windows.. but command failed and gave same error for win32 build.

ayush191992 commented 7 years ago

@evshiron May you also give a try by installing fresh version of node.js and install nwjs-build in it using npm and try to build non sdk win32 flavor in fresh system if possible ..it may be reproduce for you also..

Thanks for your time and valuable help

evshiron commented 7 years ago

Sorry for being late. I was busy making evshiron/nwjs-builder-phoenix recently, there are still some issues but it should work. Feel free to try it out.

I just tested non-sdk win32 builds in a sandbox, and the download didn't fail after setting mirror correctly.

That https://npm.taobao.org/mirrors/nwjs/ is a NW.js mirror in China mainland (people in China have difficulties connecting to Amazon S3, where GitHub and NW.js .etc store their data), and they have a mirror https://cnpmjs.org/mirrors/nwjs/ in Singapore datacenter too. Maybe you can try that.

ayush191992 commented 7 years ago

@evshiron setting mirror https://cnpmjs.org/mirrors/nwjs/ works for me. Thanks for your help.

evshiron commented 7 years ago

Cool. Glad to know :)

ayush191992 commented 7 years ago

@evshiron so if someone is building from other country they need to set mirror accordingly?

evshiron commented 7 years ago

If you have difficulties downloading from the official source you might try using mirrors. There aren't that many mirrors for NW.js I'm afraid. Choosing a correct mirror can speed up downloads and give good connection quality, so why not?