In HTML/CSS/JS Repls, any files created by a program in the shell in a subdirectory will not be hosted unless moved into the root directory and back
The files are automatically hosted without needing to be moved as described above.
You need to move the files to the root directory and back before they are hosted.
Steps to reproduce:
- Create a new HTML/CSS/JS repl.
- Make a subdirectory.
- Go into the shell and run
echo > file.
- Click run and try seeing the file in the web.
Bug appears at this link:
https://replit.com/@sdft/sdft, but also on any HTML/CSS/JS repl
Firefox 155.0.2/Ubuntu/Acer Aspire A114-32 series
I cannot reproduce this. I followed the “steps to reproduce” exactly and I was able to see the file contents fine. I created a
txt file btw.
I suspect there’s something more to this issue, could you make a short screen recording of this issue or include some screenshots? This may help us get to the bottom of this.
Yeah, sorry for not doing enough testing, it seems that it’s only when a program in the shell creates files when it doesn’t host. I edited my original post.
Something very similar happened to me the other day. I uploaded a folder from my computer and all the files were served correctly. But then I renamed the folder (using Replit’s UI) and the files weren’t accessible using the new folder name in the URL. It just showed a 404 page. The old folder name seemed to work for a while after, but eventually stopped working (probably caching).
This issue is due to the way HTML Repls work under the hood. We use static storage to contain all of the updated files in order to serve them. Certain actions, such as editing the files or moving them between locations, will sync up with the static storage. However, actions such as renaming the files or uploading them may not be properly synced. We are aware of this issue, but we don’t have a solution at this time.
Instead, you can use the HTML Auto Refresh template that doesn’t rely on static hosting to serve your files. It uses our default dynamic hosting method which does not have the same issues as our static HTML Repls.
Please let me know if you have any questions!
hmm… extension time to move the files automatically
ok i got something that doesn’t work and i accidentally published it