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)
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
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
Thats not a Zip, that a gunzipped tar. You must upload a zip file aka
solved, it was the type of compression, thanks for the support again xD
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.