Hi all,
Every time I conclude one task, all my files and directories created suddenly vanish and I need to reset it again. Basically, I needed to reset the console after every single completion.
Anyone who experienced the same issue and knows how to fix it?
Just after completing a task:
After pressing “Continue”:
That is a pain in the butt. Other than reporting a bug or following troubleshooting tips in the forum or working the lesson locally***(my favorite) there is one thing that I did. I created a bash script that saves a copy of the files to to the learn-sql… directory and then copy’s them back from that directory if one of the files is missing. I take no responsibility if you use this script, use at your own risk. If you make it better, I would love to see that. This doesn’t seem like too much work compared to 140 to over 200 lessons when all you need to do if call the script after it has been set up.
- create the file named
save_copy_work.sh
in the current working directory
- Add the files you want to save the
save_copy_work.sh
script
- move
save_copy_work.sh
to ./learn-sql-by-building-a-student-database-part-1
directory
- run (from the current directory)
./learn-sql-by-building-a-student-database-part-1/save_copy_work.sh
In order to save your work
- if any of your files disappears then run (from the current directory)
./learn-sql-by-building-a-student-database-part-1/save_copy_work.sh
In order recreate your files
#!/bin/bash
# FILE NAME: save_copy_work.sh
# RUN COMAND: ./learn-sql-by-building-a-student-database-part-1/save_copy_work.sh
# a bash script that lets you save your files or replace your missing files with your already stored copies.
# check if all the files exist
if [[ -f <file_1> && -f <file_2> ]]
# If the files exist then save or overwrite (-f option) each of
# the files to the learn-sql... directory
then
cp -f <file_1> learn-sql-by-building-a-student-database-part-1/<file_1>
cp -f <file_2> learn-sql-by-building-a-student-database-part-1/<file_2>
# else copy and overwrite the already saved files to the current directory
# ***you have to run this file first to save the files or else you don't have any files to begin with!***
else
cp -f learn-sql-by-building-a-student-database-part-1/<file_1> <file_1>
cp -f learn-sql-by-building-a-student-database-part-1/<file_2> <file_2>
fi
Wait a minute, so it is actually a common problem?
I don’t know if it’s common but I’ve had it happen to me where the files disappear. Luckily we can use freeCodeCamp locally.
I’m having this happen to me right now. Very annoying to have to reset the lesson every time.