[HELP]The file you upload is not a valid ZIP

Hello everyone, today I packed my frontend in a .zip, then uploaded it to dashoboard, after these steps I try to move to the hosted test, but the error of type: invalid zip, am I doing something wrong?

information about the process:

  • I packed the linux terminal (root frontend )
  • I packed the node_modules together (I do not know if the twitch process instantiates the packages to upload to cdn)
    68MB

Captura de tela de 2018-07-14 22-00-05

Looking at your project,

You only need to upload the folders in build

Twitch’s CDN is static, so node_modules won’t make sense to upload.

What you upload, needs to be purely static, a couple of HTML files, some JS, some images etc. Nothing dynamic that needs server side rendering

I understand, I followed your advice and I compressed only the build directory, I still continue with the same error, I still do something wrong?
I looked at the upload header and the following formats are allowed: Accept-Encoding: gzip, deflate, br

@edit

my frontend project is done in react
the routes are made with react route

You need to create a build that doesn’t run on a nodeJS server, has to be served from static.

The file you have highlighted in the recent screen shot is build.tar.gz

Thats not a Zip, that a gunzipped tar. You must upload a zip file aka build.zip

1 Like

solved, it was the type of compression, thanks for the support again xD
@edit

for who is linux user the correct command is recursive, for example in the react of the build folder is:
zip -r name.zip ./*

routing works with react-router-dom with hashrouting

the paths by their turn are:
/ # / viewer
/ # / page-config
/ # / live_config

I hope it helps someone in the future.

1 Like