The Night Everything Broke
The Night Everything Broke
The gym smelled like floor wax and cold pizza. Maya Patel sat in the third row of folding chairs, hugging her laptop to her chest like a shield, watching the team before her fumble through a live demo of a homework-planner app that had clearly never met a real user. The clock on the back wall read 6:47 PM. Her slot was at 7:15 PM. She had twenty-eight minutes to stop feeling like her stomach was trying to crawl out of her throat.
Six weeks of evenings. Six weeks of skipping soccer practice, of her dad knocking on the door at midnight with a mug of chai and a worried smile, of arguing with her best friend Dev about whether MongoDB or PostgreSQL was the right call. Six weeks of building Pantry Pal, an app that lets a family photograph their fridge, log what's inside, set expiration alerts, and generate a shopping list from what's actually running low. She had written it in Node.js, with an Express server, a MongoDB backend, and a tiny React front end that her cousin Riya had designed during one caffeinated weekend. It was, in her biased opinion, the most useful thing she had ever made.
She opened the laptop. The home screen of Pantry Pal bloomed to life. A cheerful carrot icon waved at her. The "My Fridge" panel loaded in under a second, populated with a demo family — the fictional *Patel-Hernández household* — that had a half-empty milk carton, two soft tomatoes, and a suspiciously ancient block of cheddar. The expiration badges glowed red, yellow, and green in the right places. The shopping list updated as she tapped items. The whole thing was *alive*.
It was, in the lopsided words of the developer community, working on her machine.
She took a breath. She closed the laptop. She said a small prayer to a god of code she didn't quite believe in, and waited for her name to be called.
Thirty-Seven Seconds of Glory
When Mr. Park, the school's computer science teacher and the evening's MC, finally said, *"Next up — Maya Patel, Lincoln High, with Pantry Pal,"* Maya stood up on legs that were mostly jelly, walked to the demo table at the front of the gym, and plugged her laptop into the projector.
What followed, she would later describe in her journal as *thirty-seven seconds of glory*.
She opened the app. She explained the problem — that the average American family throws out about a third of the food they buy, and a huge chunk of that waste is because nobody knows what's in the back of the fridge. She showed the photo-recognition feature, which was a little janky but worked most of the time. She showed the expiration alerts. She showed the shopping list, generated automatically, that could be texted to a parent's phone. She invited a judge, Dr. Mendoza from the state university, to come up and add a fake item — *"Let's add some cilantro"* — and the list updated live. Dr. Mendoza actually laughed. The audience actually clapped.
Maya saw Riya in the back, mouthing *"Yesssss."* She saw Mr. Aldrin, her after-school mentor and the reason she had ever written a line of code, leaning against the side wall with his arms crossed, the faintest hint of a smile on his face.
Then Dr. Mendoza leaned forward, the way curious people do when they want to see behind the curtain, and said the seven words that would later make Maya want to crawl under the demo table.
*"This is wonderful. Can we see it running on the school server? We want to make sure it actually survives a real environment."*
The Server Room Was Lying in Wait
The school server was a hand-me-down Dell tower living in a windowless closet on the second floor, surrounded by a coil of ethernet cable and a framed photo of a former principal nobody remembered. It ran Ubuntu 22.04 LTS, the long-term-support version that the IT department had installed two years earlier and never quite updated. It was, in the gentle language of system administrators, *set up once and forgotten*.
The IT volunteer on duty, a senior named Theo who had learned Linux from YouTube, was happy to help. He created a directory for Maya, copied her project files onto the box, and showed her how to SSH in. Maya opened a terminal on her laptop, typed the magic incantation, and the cursor blinked at her from across the network.
She ran `node server.js`.
The first error came back in under a second.
``` /usr/bin/node: No such file or directory ```
She stared at it. She had Node on her machine. She had Node everywhere. Her machine, her dad's machine, the school library machines. Node was as universal as a USB cable.
"Wait," she said to Theo. "Is Node not installed on this thing?"
Theo shrugged the shrug of a man who had installed the OS two years ago and had not thought about it since. He tried `apt list --installed | grep node`. The terminal was unhelpful. He tried `which node`. Nothing. He tried `which nodejs`. The terminal, with great enthusiasm, announced the presence of `nodejs` — version 14.21.0, a release that was already two majors behind and was scheduled to be deprecated in a few months.
Maya's app, written lovingly in modern JavaScript, used features that had been introduced in Node 18. Spread operators in certain positions, optional chaining, the built-in `fetch` API, top-level `await`. The server didn't know what any of those things were.
"Okay," Maya said, her voice climbing in pitch the way it did when she was about to lose it. "Okay, fine. I'll just install a newer Node. There's a thing called nvm, right? Node Version Manager?"
Theo brightened. "Oh, sure. I can install that. Hold on." He started typing. Three minutes and a handful of permission errors later, he had nvm installed for his own user account. Maya's project, however, was in a different directory owned by a service account. The `nvm` install was visible to one user and not the other. The version of Node Maya wanted was 20.10.0. The version that would actually run the app was 14.21.0. The two versions were not on speaking terms.
She did the thing every coder has done at least once. She tried to make the old version work. She `npm install`-ed her dependencies into a project tree that was *almost* compatible. Most of them installed. A few did not. One of them, a popular HTTP client, had dropped support for Node 14 the previous year.
"Whatever," Maya muttered. "I'll just downgrade that one library to an older version. No big deal."
She changed the version in `package.json`. She ran `npm install`. She ran `node server.js`.
The second error was a different beast.
``` Error: Cannot find module 'mongoose' Require stack:
- /srv/pantrypal/server.js
```
But she had installed `mongoose`. She had installed all her dependencies. The `node_modules` folder was right there. She could `ls` it and see `mongoose` in the list, sitting between `morgan` and `multer` like a loyal soldier.
The problem, she eventually figured out, was that she had installed the modules on her laptop, zipped up the project folder, and copied the zip to the server. The `node_modules` folder on her laptop had been built for macOS on Apple Silicon. The server was Linux on x86_64. Some of those modules contained precompiled binary code — the parts of libraries like `mongoose` and `bcrypt` that are written in C++ and compiled at install time for speed. Mac ARM binaries do not run on Intel Linux. They are, in the technical sense, made of completely different machine code.
The compiled pieces could not be coaxed into cooperating. The whole app refused to start.
"Okay, okay, okay," Maya said, mostly to herself. "I'll delete `node_modules` and reinstall. Just a minute."
She did. The reinstall took ninety seconds. The app, finally, started. She watched the terminal output scroll past — `Server listening on port 3000` — and felt a wave of relief that lasted exactly as long as it took the very next error to appear.
``` MongoServerError: connect ECONNREFUSED 127.0.0.1:27017 ```
The MongoDB database was not running on th