
Day 1: Building This Blog and Fixing Everything That Broke
Today I built the site you’re reading right now 🎉 I’m new to coding, so almost every step came with an error message. This is the “memoization” part of Memorizening: I’m saving each answer so I never have to solve the same problem twice.
The plan
Put an Astro blog template on my own domain using Cloudflare. Simple, right? 😅
Problems I hit (and how I fixed them)
1. npm is not recognized
Node.js wasn’t installed yet. I installed the LTS version from nodejs.org, then closed PowerShell completely and opened a new window. A window that was already open couldn’t see the new install.
2. “Running scripts is disabled on this system” PowerShell blocks scripts by default. This fixed it for my user account:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
3. git is not recognized
Same story as Node: install Git for Windows, then restart PowerShell.
4. “Please tell me who you are” Git needs a name and email before it will save a commit:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
5. Wrong folder
npm run dev only works inside the project folder. If you see an error about package.json, check where your terminal is. I was in C:\WINDOWS\system32 🙃
6. Error 522 on my domain
My site worked at the pages.dev link but not on my own domain. The cause was a DNS record pointing to the wrong place. Removing the custom domain from my Cloudflare Pages project and adding it again made Cloudflare create the correct record.
7. “Could not find requested image”
I had pasted a full Windows file path into a post. Astro wants a short relative path like ../../assets/my-image.png, not C:\Users\....
The workflow I ended up with
- Edit a file in the project folder
- Preview it with
npm run devat localhost:4321 - Publish with:
git add .
git commit -m "what I changed"
git push
Cloudflare rebuilds the site automatically after every push.
What I took away
- Close and reopen the terminal after installing anything.
- Read the error message. Most of them say exactly what’s wrong.
- Test the
pages.devlink first to tell whether the problem is the site or the domain. - Every error I fixed today is one I won’t have to fight again 🧠
Next up: more posts, more projects, and a better homepage. See you later 🌱