$PATH to most resistance

Heather Church
2 min readDec 30, 2020

Well, I didn’t want something like this to be my first blog, but alas, I feel like crisis is built into being a developer. What happened you ask? I unknowingly changed my $PATH instead of appending paths and it lead to a whole $h!+ storm of problems.

Here’s a little back story, that probably isn’t all that interesting:

After learning A LOT of frontend languages and frameworks for the past six months, I decided that I was finally ready to take on some “new” languages and expand my knowledge into backend languages. I enrolled in a “Learn Python” course on codecademy (which I ❤️ btw) and was off to a smooth start.

I learned about (or reviewed) functions, control flow, lists, loops, strings, and modules up to this point. I saw review because aside from the MUCH MUCH easier syntax than javascript, I already knew how most of these things worked. It’s modules that started the invisible snowball to $PATH death.

My terminal while I just followed the course instructions that ended up to the impending doom of my $PATH

In the modules lesson, I learn about import modules and files and so on. Then, I get to a video lesson where I learn about Virtual Environments with pipenv. This section was all very intriguing to me. I follow the tutorial and within the video it tells me to do commands (much of which I am unfamiliar with because I am new to python and the like) and at some point it has me enter the following into my terminal:

$pip install — user pipenv
(copy path name given)
$vi ~/.bash_profile
(INSERT)
export PATH= “{pathnamegiven}.bin:$PATH”
(press esc)
$:wq

All while this is happening, I am secretly setting myself up for a h311 of a day when I want to run npm next.

Fast forward to today when I go to work on a React Project and all of my npm commands are returning: ‘command not found’

Insert googling spree:

“why would npm not be working?”
“how to change PATH on mac using the command line”
“bash: /users/heather/.bash_profile: permission denied”
“i installed pip and changed my path and now npm doesn’t work”

There was a lot more googling, but I am going to refrain from TOTAL embarrassment.

Me: after what seemed like days of googling (was probably only 30 mins)

I finally found the answer here:

and use this to reset my PATH

export PATH=$PATH:$HOME/bin

Now, all is well and I’m running node again.

What’s my takeaway from this experience? I’ll tell you:

  1. I always see to mess something up via my command line
  2. I have learned A LOT of do’s and don’ts by making those errors
  3. DON’T CHANGE YOUR PATH. . . only append to your PATH
  4. I am getting so good at googling that I just my put “google master” on my resume.

--

--

Heather Church
0 Followers

MusicianTurnedTechNerd. I’ve always been fascinated by technology, so when the pandemic pushed for a career change, I didn’t think twice about becoming a coder.