shoutem / cli

Shoutem CLI is a tool which helps you build Shoutem extensions faster
Other
30 stars 11 forks source link

Unexpected end of file #34

Open minotaurrr opened 6 years ago

minotaurrr commented 6 years ago

Hi guys,

I'm getting this error when I run shoutem clone

? Select your app Restaurants (39905)
cloning to Restaurants
? Directory Restaurants already exists Overwrite
Cloning 'Restaurants' to 'Restaurants'...
unexpected end of file

Use shoutem last-error for more info

errno:   -5
code:    Z_BUF_ERROR
stack: 
  """
    Error: unexpected end of file
        at Zlib.zlibOnError [as onerror] (zlib.js:133:17)
  """
message: unexpected end of file

Tried brew update but didn't help. Anyone with a similar experience?

Definitely-Not-Vlad commented 6 years ago

Hi @minotaurrr,

I've tried replicating the issue with your app (I'm an Admin on the Shoutem Builder, so I'm able to do so, other users can't clone other's' apps).

I was unable to reproduce the issue. This may be an issue with npm, check this issue for more information.

My environment: npm 3.10.10 Node.js 6.11.0 OSX 10.13.1

nazrdogan commented 6 years ago

I m getting same error.

nazrdogan commented 6 years ago

@minotaurrr Did you solve your problem ?

aiguanglin commented 6 years ago

I m getting same error too.

digiwala commented 6 years ago

Please solve this issue

ashokkumar88 commented 6 years ago

I am getting same error.

Node: 8.9.4 npm: 5.6.0 OS: Windows7

atulquest93 commented 6 years ago

Also getting the same error ! Any solutions ?

Definitely-Not-Vlad commented 6 years ago

Hey everyone. Can you please provide your environment details so I can attempt to reproduce the issue?

Looking at other people's reports regarding this, the issue is often tied to an unstable or otherwise unusual internet connection. It's possible that proxies, VPNs or simply a poor connection may be causing issues when attempting to download the issue.

Apparently, Nodejs versions 4.6.0 and 7.X.X help resolve the issue in most cases as well.

nazrdogan commented 6 years ago

Mine is now resolved. I updated CLI. its seems ok. I m using node 8.9.4

atulquest93 commented 6 years ago

@Vladimir-Vdovic

Shoutem CLI :

-- @shoutem/cli@0.10.9 +-- eslint@2.9.0 | +-- es6-map@0.1.5 | | +-- d@1.0.0 | | |-- es5-ext@0.10.39 deduped | | +-- es5-ext@0.10.39 | | +-- es6-iterator@2.0.3 | | | -- es5-ext@0.10.39 deduped | | +-- es6-set@0.1.5 | | |-- es5-ext@0.10.39 deduped | | +-- es6-symbol@3.1.1 | | | -- es5-ext@0.10.39 deduped | |-- event-emitter@0.3.5 | | -- es5-ext@0.10.39 deduped | +-- escope@3.6.0 | |-- es6-weak-map@2.0.2 | | -- es5-ext@0.10.39 deduped | +-- is-my-json-valid@2.17.2 | |-- is-my-ip-valid@1.0.0 | -- js-yaml@3.10.0 |-- argparse@1.0.10 +-- form-data@2.1.4 | -- mime-types@2.1.18 |-- mime-db@1.33.0 -- ngrok@2.2.24 -- request@2.83.0 +-- form-data@2.3.2 | -- mime-types@2.1.18 deduped +-- hawk@6.0.2 | +-- boom@4.3.1 | |-- hoek@4.2.1 deduped | +-- cryptiles@3.1.2 | | -- boom@5.2.0 | |-- hoek@4.2.1 deduped | +-- hoek@4.2.1 | -- sntp@2.1.0 |-- hoek@4.2.1 deduped `-- mime-types@2.1.18 deduped

$ node -v v9.5.0

$ npm -v 4.6.1

Windows 8, 64 Bit.

Error : Cloning restro to restro... unexpected end of file

Use shoutem last-error for more info

$ shoutem last-error errno: -5 code: Z_BUF_ERROR stack: """ Error: unexpected end of file at Zlib.zlibOnError [as onerror] (zlib.js:142:17) """ message: unexpected end of file

If you think this error is caused by bug in the shoutem command, you can report the issue here: https://github.com/shoutem/cli/issues

atulquest93 commented 6 years ago

@nazrdogan Which shoutem cli version you are using ?

ashokkumar88 commented 6 years ago

Mine issue resolved now. I downgraded my node version to 7.x.x and it is working fine now.

ashokkumar88 commented 6 years ago

@atulquest93 Downgrade your node version to 7.x.x and it will work.

nazrdogan commented 6 years ago

@atulquest93 I m using . 0.10.9

digiwala commented 6 years ago

node v- 8.9.4 arch -64 bit on windows v- 10 arch -64 bit Pro shoutem-cli v -0.10.9 also tried with node v7.10.1, 7.2.1, 7.5.0

gewentao commented 6 years ago

getting the same error with node v7.10.0, v8.9.4 LTS

aiguanglin commented 6 years ago

it don`t work with node v7.10.1,npm v4.2.0 macOS v10.13.2

gewentao commented 6 years ago

Still getting this error with

> npm -v
3.10.10

> node -v
v6.11.0

> shoutem -v
0.10.9

as @Vladimir-Vdovic commented.

macOS 10.12.6

Is anyone working on this issue? Thanks!

trumhemcut commented 6 years ago

Me too, same issue:

> npm -v
5.6.0
> node -v
v8.5.0
> shoutem -v
0.10.9
aesqe commented 6 years ago

Sorry for the long wait, everyone, I hope we'll be able to fix this soon.

We've released a new beta version on npm - it does not fix the issue, but it should provide clearer HTTP and unzip errors.

Please install it (npm install -g @shoutem/cli@beta) and try cloning again. When you get an error, please paste it here again.

Thank you for your patience.

aesqe commented 6 years ago

We've published a new beta to npm today (v0.11.0-beta5).

After spending some time reading about zlib errors and trying to replicate this particular error*, we've decided to do the following if a Z_BUF_ERROR is encountered when unpacking tgz archives:

There's always the possibility that this is a non-fatal error (https://zlib.net/zlib_faq.html#faq05) and the process might be able to continue, but that's hard to determine without more information. Therefore, we'll look into implementing checksums so we can be certain of a downloaded file's integrity.

* the results were inconsistent. We've encountered the error once when running shoutem clone, and everything went fine a minute later when retrying the same command. So, it's probably safe to say that the error is somewhere in the network transfer.

idougwarner commented 6 years ago

It is not working on windows 8, 10 but it is working in mac os

davinderkumar commented 6 years ago

$uname -a Darwin Davinders-MBP 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

//MacOS High Sierra; 10.13.2 (17C88)

$ node -v v10.6.0

$ npm -v 6.1.0

$ shoutem -v 0.11.0-beta5

shoutem last-error errno: -5 code: Z_BUF_ERROR stack: """ Error: unexpected end of file at Zlib.zlibOnError [as onerror] (zlib.js:153:17) """ message: unexpected end of file

If you think this error is caused by bug in the shoutem command, you can report the issue here: https://github.com/shoutem/cli/issues

davinderkumar commented 6 years ago

It worked after I deleted .shoutem folder from user home

$rm -rf ~/.shoutem