Hello and welcome to Part 2 of the wasp ubutntu saga. If you haven’t read part one yet, don’t — nothing interesting happened. Here’s a recap:
I found this cool app that made memes for you by plugging into the API’s of ChatGPT and Imgr
I found a tutorial to follow to build my own
the tutorial was really just advertiser content for this thing called wasp which is a framework (that’s full stack for all the pancake heads in the back)
I tried installing wasp but couldn’t on a windows
I installed a virtual version of Ubuntu
Ok you’re caught up. Now I’m once again wondering where this Ubuntu is. And how it differs from everything else on the computer which is, itself, all virtual.
Anyways I run the simple command to set up Wasp now and it mostly works except for one thing: the PATH is missing!!!
The PATH error is where I usually give up. Look at that error message its so vague:
WARNING: It looks like '/home/alexdobrenko/.local/bin' is not on your PATH! You will not be able to invoke wasp from the terminal by its name.
You can add it to your PATH by adding following line into your profile file (~/.profile or ~/.zshrc or ~/.bash_profile or ~/.bashrc or some other, depending on your configuration)
“It looks like”?? The fuck is this passive agressive shit actually I’m super passive agressive cuz I never wanna hurt anyone’s feelings so I get this actually.
The next part though: add the following line into your profile which could be at any one of these several locations OR SOME OTHER DEPENDING ON YOUR CONFIGURATION!
It’s like jesus you’re the computer program why can’t you figure out where it is and change it?!
Herein we arrive at one of Alex’s Big Questions About Coding:
Why does the computer not just DO all the stuff its telling me to do ? It’s like “uh oh here’s a problem I could easily solve but I won’t cuz I’m busy and you’re dumb good luck.”
Anyways I just copy the line it says and it works by which I mean I get no message of any sort, positive or negative:
Passive agressive again! But ok then I try doing Wasp New
and I get a red huge big deal X error!
Install node it says. Ok I say, and type install node
. Which is not accepted! I remember that I’m in Ubuntu world which has rules that are different from the ruel.s I don’t know in Windows world.
Not gonna even bore you with the next part but eventually I install NPM which is, itself, an install manager that is gonna help me install all this other shit I need.
Then I hit it with “npm install node” which works!
hahah jk that didn’t work AT ALL.
I then had to install nVm which is different in ways I do not know, copy paste a bunch of other shit, and then finally update my Node version to 20 which, according to this error, is less than 18:
Turns out I need to install exactly that version of Node which I then do and IT ALL WORKS!
And now, I’m left with two questions:
what the fuck is node?
what sort of app should I build!
what is path?? hehe trick third question
After thinkking about it for three minutes, here are my answers:
No clue.
I’ve got this idea I’m cooking up with my pal Quinn. Let’s see if I can build it on here.
All I can think about are ‘desire paths’ which are human made paths that stray from the path created by the road maker city people?
In terms of a PATH for a computer, it feels like there’s some file that acts as an bouncer? So when you try to run something, it says ‘do you have the PATH card to do that?” and it’ll check the path file which could be in one of hundreds of places.
If you’re on the list, come on into the PATH Party. If not, get outta here you’re not on the PATH here are some unhelpful instructions about one of several places in this city you could go to get onto the list!
Ok that’s it for now. Actually wait no I’ve got some questions for you all:
How are you liking this newsletter so far?
what is a path really?
Am I going into too much detail with the code itself? Not enough?
Do you think I will learn to code?
LET SENSEI SHARE HIS WISDOM
In the interest of your sanity, here’s a human readable explanation of the “PATH”:
It’s a list of folders where your computer tries to find programs and files. There’s a bunch of defaults set there, like “/bin” and “/usr/bin”, which are common places where programs get installed.
So when you type a command into your terminal, it will look at the directories stored in the PATH to try to find a program with the same name as your command. If the necessary directory is missing from your PATH, you get those confusing errors :/
Hopefully that makes it make more sense?
WHY IS THE COMPUTER DUMB AND NOT FIX IT FOR ME
Short answer: probably because computers are the devil. Or infested by little slave devils that hate us all.
The real answer is that Linux has a tradition of trying to avoid making unexpected changes to a user’s configuration files, because doing so unexpectedly could cause EVEN WORSE EVILS TO BE LOOSED.
I also think it’s a fixable and stupid problem but eh.
HOW FIX?:
Your terminal is a kind of program called a “shell”. Ubuntu (and most other types of Linux) use a shell called “bash” by default.
Shells are really just programming languages you can use on the fly. You can do math or set variables in them, as well as execute programs.
PATH is just a variable which is set by default in bash. Your computer does this by automatically running “scripts” when you open your terminal.
“Scripts” are a type of program written in the language of a shell like bash. They are just files filled with lines of regular shell commands.
There is a hidden script in your user’s home directory called “.bashrc” which is automatically run when you open your terminal. To update your PATH you can modify this file in a text editor and adding a new line at the bottom which adds the missing directories, something like this:
PATH=$PATH:/your/new/path/here
1. Yes
2. Path is the computer version of when someone gives you directions by rattling off highway exit numbers when really you just need them to tell you whether it’s the exit right before the lake or the one right after it.
3. TBD
4. The magic conch says, “nothing” 🤷♀️