Hi, I have constant problems with the fact that the video does not load when it is deployed.
I have a project connected to the depository and videos do not get into it, and they are not shown on the site either. But if you upload manually, then all the videos are displayed and uploaded - how does it work and how do I configure the videos to be uploaded?
@krewe58 Did you link those screenshots incorrectly?
The description, (and links to the site), indicate that videos are only uploaded when you do so manually, but the screenshot of the deploy file browser appears to show the opposite?
Being able to check a repo is just the fastest way for someone else to confirm that.
You can check yourself by running your npm run build command locally and checking what’s in the dist folder that is produced. If there’s no video files, then that’s your problem.
You’ve not mentioned what you’re working with, but the fix is to place the files wherever ensures that they end up in the dist folder after the build completes.
Often you want to place the files in public as with Vite, React
@krewe58 They may be in the dist folder, but are they still there after you run npm run build?
Most systems delete and recreate their dist folder each time the build is run.
If you have manually added files to the dist folder directly, there is a good chance they’re getting deleted by your build.
You would fix it by NOT manually putting them in the dist folder, but into whatever folder the system you’re working with wants static assets to be placed into, as previously mentioned this is usually something like public.
@ nathanmartin
Hello, maybe I didn’t express myself correctly or you didn’t understand me
The gist is this:
After assembly, all videos are in dist - everything is correct here. These videos are in the dist folder.
Then it’s all pulled up on netify, and here everything except the video is pulled up.
But I tried to take the same dist folder and upload it as a separate project in the deploy manual and all the videos are shown in this case - since they got to the host and I see them in the files.
That is, I am absolutely sure that the problem is in the delivery of videos from github > netify, because I looked - initially there are 134 files in the dist folder, and when it is pulled up to netify, there are only 130 files in it, with exactly 4 videos missing.
I checked thinking that the problem might be in git ignore, but everything is clean there.
I want to explain that I don’t add videos anywhere manually, they are in src and are built in dist themselves - they are not pulled from dist to netify
Yes, I fully agree with what you wrote. I recorded a short video (sorry for my English), I hope it won’t cause more confusion - in it I just wanted to show that I specially added a video in git just manually to the repository in the last commit and it’s clear that this commit was sent to netify but the video is like this and didn’t appear. In another case, I uploaded the entire dist folder to netify in manual mode and the video is there and is shown perfectly on the site via another link - that is, the project works correctly.
Hi, @krewe58. Part of the reason we are not able to better assist here is that no one but you can see some of the key details needed to troubleshoot. Specifically, we cannot see the private repository being used for this site.
We would need to examine the repo to debug this. We cannot see the repo so we cannot debug it directly. We can only give you suggestions to debug it because only you can see the repo.
Would you consider making the repo public or making a minimal reproduction of this issue in a new repo which is public?
Good afternoon, it seems I solved the problem - I found a dependency that the base directory was not specified in my project - now I installed dist and everything seemed to work, in another project too. Dropbox - img-2024-03-07-10-51-58.png - Simplify your life
I’ll keep watching this
Hi, @krewe58. I’m concerned that the setup you describe is incorrect and that, while it works today, it is only going to cause more problems in the future.
This is what I think is happening below. I emphasized “think” because this is only a guess below. I cannot say for certain without more information (like the name of the framework you are using or access to your repo).
So. again, this is only a best guess below but what I think is happening is this:
normal the dist directory would always be empty and no files would ever be committed to the repo in that directory
however, I suspect you generating file in that directory locally with your local build command and then committing those files to the repo
that (committing the files in dist to the repo) is not at all a recommended practice and not how the framework is intended to be used
this means making dist the base directory fixed the missing video issue but it normally would not if the framework was being used as intended
Again, I’m only guessing about this above. However, that means that then entire Git-back build and deploy workflow at Netlify is being done in a way never intended by either the framework developers or Netlify.
My concern is that using the workflow being used will then result in other unexpected behavior in the future (things like code changes you make not showing up).
You don’t necessarily need to make your repo public but if you do tell us what framework is used for this site we can likely confirm if my hypothesis above is correct or not.
Good afternoon, thank you very much for the detailed feedback - the fact is that I am frontend, I post exactly the layout on the platform, so dist is the most relevant and final state
@krewe58 I see a video on your homepage, so it is loading. It isn’t playing though because autoplay isn’t set and there are no player controls to start the video manually.