2 Answers
It should not disappear for that reason. Moreover, you can rerun git clone https://xxx command and it will copy it again. Make sure you run it after cd to /home/xxxx folder.
Bit late to the party on this one, but for anyone else facing this issue in the future I’d suggest a this process:
~ Ensure you’re in the correct working directory and that the files are still there using the below commands:
~/gcp-cloud-engineer/cloud-shell-hello (user-project-01)$ pwd && ls
This will return 2 outputs as below:
Current dir: /home/
All files in the current dir:
hello.js html-hello.js
From looking at the above example, I think you are trying to run this without having navigated into the gcp-cloud-engineer folder before running the node command
Should this still not work, clear any left-over files of a potentially corrupt clone and re-pull from git using the below command
rm -rf /home/
Hope this helps