Tell us what’s happening:
Hi freeCodeCamp team,
I’m working on Learn Nano by Building a Castle (Relational Database certification) using the local setup (VS Code + Docker + CodeRoad). The step about the roof row keeps failing with the same error, even though my file matches the instructions.
Environment
- macOS: 15.6.1
- VS Code: 1.140.0
- Docker: 28.5.2
- Terminal: the container terminal (prompt is
camper: /project$)
The step
The instructions say to make the top row the roof, like this:
| |______________| |
(two spaces between the first and second bars, 14 underscores, then the bars and spaces repeated). The example code block under “Make it look like this” shows up empty for me, so I’m using the row from the “whole castle” example. I’m not sure if that’s a rendering problem or if the example is meant to be empty.
The instructions also say to keep the castle six stories high, change no other rows, and save with control + o then enter.
My file (castle.sh)
echo "
| |______________| |
|
|
|
|
|____________________|
"
Output of cat -A castle.sh (no trailing spaces or tabs):
echo "$
| |______________| |$
|$
|$
|$
|$
|____________________|$
"$
Output of bash castle.sh:
| |______________| |
|
|
|
|
|____________________|
What I tried
- The version above (roof, 4 single
|rows, bottom row, matching the sample in the instructions) - A version with 6 single
|rows between the roof and bottom row (8 rows in total) - Retyping the roof row by hand instead of pasting
- Saving with Ctrl+O and Enter, then exiting nano with Ctrl+X
Error
When I run the tests, I get: Your castle should be drawn correctly
Screenshot of my working castle in nano below:
Screenshot of running the castle.sh file in terminal in VS Code below:
Both versions fail with this same error. Is the test expecting a different number of rows, or could this be a test runner problem like the one other learners have reported with this tutorial? Thanks for any help.
Your code so far
Lesson URL (copy - paste from your browser’s address bar)

