Writing a blog so I can avoid stackoverflow when I inevitably generate an application in the wrong directory and project files explode at an exponential rate

Deirdre Sullivan
3 min readJun 4, 2022

I never had this issue until a few months ago when, while having covid, I spilt tea on my macBook and destroyed it beyond the point of return (or even selling it for parts). I got an iMac and downloaded the exact same software /applications I used on my previous device (i.e. VS code, npm, babel, etc). Now, whenever I try to generate a new React application, project folder will have 150+ unnecessary files which makes it hard to navigate to the boilerplate React files I need to start building. With other applications that I don’t use React for, I will run into a similar problem but instead of having a ton of useless dependencies, I will see other folders/files from my own hard drive. I have temporarily resolved this at points in the past, but the problem invariably resurfaces, usually at 1 a.m, when I can’t contact any of my coding buddies and I try to sift through stackoverflow to find similar, yet uniquely different problems others have than my own. Let’s just say I am done.

I am documenting this (hopefully) final troubleshooting effort so I don’t hate myself for spending 1+ hours looking for answers and not moving beyond running npx create-react-app in my terminal.

Sooo after a little bit of research, it appears that my .git file is too high up in my folder hierarchy. The .git file is often hidden. Leaving this here for future reference when I forget that you can see these files using ctrl + shift +period(.):
https://www.pcmag.com/how-to/how-to-access-your-macs-hidden-files

All the things my computer does not want me to mess around with.

This is happening because I am generating applications under users/deirdresullivan which is definitely not where I should be doing this. I really don’t know why this virtually never happened with my old computer, but whatever. I deleted my .git and .gitconfig, and started a new react application.

The results….

Ta-da! It works.

Ok so, upon consulting other bootcamp grads, it appears my coding bootcamp set me up with a file structure on my old macBook that allowed me to create personal/not super serious projects without considering where they were going. I never ran into an error, so I never bothered to understand the process. I need to fine-tune my dev flow and be more conscious on where I am creating things within my file structure. Time to watch a 2 hour Linux tutorial.

https://www.reddit.com/r/ProgrammerHumor/comments/6s0wov/heaviest_objects_in_the_universe/

--

--