It's the little things.
Have you ever neglected your personal site for, oh, I don't know β nine months? And then when you take a look at it, you wonder why it's the way it is, and how you set it up, and what it says about you as a developer?
Personal sites are like blinking neon signs that say, "Fraud here!"
Or that's how it seems. This time I cloned my repo and and tried to deploy without any changes, and just couldn't make sense of the error messaging. What have I done? How did I build this in the first place?
How did I get here? This is not my beautiful homepage.
I got so depressed that I just gave up for a while and told my wife I'm not a real developer. She wouldn't hear it. And somewhere along the way, I figured out that Netlify was running the wrong version of Node.
I tried different solutions, and every time it was using Node 12 instead of Node 14.
They say it's the little things, and it's hard to think of a thing that could have been smaller than this. When I was ready to give up for the second time, I noticed a file called .nvmrc
. That sounds like Node Version Manager. Plus 'rc,' whatever that means β¦ looks like gibberish.
I opened it up and guess what the file contained?
One number. Two characters:
12
That's it. Nothing else. Just the number 12. .nvmrc
was the culprit. I'd forgotten something I've posted about before, when talking about bash and zsh and vim, namely that the 'rc' suffix means runcom, i.e., "run commands," and in this case, this is one of the ways Netlify can tell which version of Node to use to build the site.
I changed it to 14 and the deployment went perfectly.
So it really is the little things. And you need to pay attention to them.