The Road to CTO (#1)
npm-ing myself to death on the command line
Today marks the first day of my trekking off into the land of real programming. I’ve known my way around the Chrome Inspector and custom CSS for the better part of two years now, and I often wish that I’d forced myself to practice JS as diligently as its cascading sister — but the past is the past, and I can’t change it.
Instead, with PubLoft approaching product-market fit and outgrowing our previous “stack,” I’ve realized that it was time I took the plunge and became the CTO who will get this MVP running — though not necessarily the one who will take it to scale.
Without further ado, in an effort to humble myself, track my progress, and [hopefully] retain some of this stuff long-term, here’s Issue #1 of The Road to CTO by yours truly, inspired by my immensely inspiring cofounder’s 100 Words A Day.
- Atom live server isn’t enough to get a React app running on localhost.
- Atom won’t do anything git-related (like pull, push, or even commit) unless your local directory is super clean and exactly what it needs.
- Always run
npm-install
beforenpm-start
. (Thanks Jonny Reiss!) - Sometimes, the fastest and least hair-tearing way to get things rolling again is to simply kill the
.git
file, rename the directory, and clone a fresh version of a Github repo. - If node packages break, deleting and reinstalling
/node_modules
is a good first step in troubleshooting. (Credit again goes to Jonny.) - You can check nvm and npm versions with
nvm -v
andnpm -v
. - FontAwesome has a React package!
- It’s possible to import multiple components in one React command.
- One undefined component can prevent an entire React app from compiling. 😱
- React styles things slightly differently than regular CSS, using camelCase parameters and ‘single quotes’ to pass CSS values as strings. You can also use
theme.palette…
to style with React theme elements, though I haven’t figured out how to do it yet. - Starting with a base project from a killer developer makes things way easier to learn than starting from scratch. A drowning man can’t swim. (Thanks Travis for getting us rolling!)
- I still have a long way to go.
Originally published at medium.com on January 16, 2019 under my old profile.