mantus.ai

What this covers

You have a working project but the terminal keeps asking you to run things you do not understand. This step translates the five commands and files you will see every day into plain English.

What I did

Claude Code kept telling me to run things. npm install. npm run dev. npx create-next-app. I ran them. They worked. I had no idea what any of them actually did. I was typing incantations and hoping for the right result, which is fine until something breaks and you need to know which incantation went wrong.

So I stopped building for an afternoon and figured out what I was actually typing.

npm is a package manager. The simplest way to understand it is as an app store for code. When your project needs a tool that someone else has already built, npm downloads it and puts it in a folder called node_modules. The command npm install reads a list of everything your project needs and downloads all of it.

npx is different from npm. It runs a command once without permanently installing anything. npx create-next-app downloads the Next.js setup tool, runs it, and does not leave it on your machine. Think of it as a disposable tool for a one-time job.

package.json is the project's description file. It lists the project name, the packages it depends on, and the scripts you can run. The "scripts" section is the one that matters most day to day, because that is where commands like dev and build are defined.

npm run dev starts a local development server. It runs your site on your machine so you can see changes in real time. The URL is usually localhost:3000. This is your workshop. You make changes, save the file, and the browser updates.

npm run build creates the production version. It takes your source code and compiles it into the optimized output that Vercel will serve to visitors. This is the factory. If npm run build fails on your machine, it will also fail on Vercel.

Here is where I made my mistake. I was following a tutorial that used yarn instead of npm. Yarn is an alternative package manager that does roughly the same thing. I ran yarn add for one package and npm install for the rest. This created two lock files, yarn.lock and package-lock.json, which is like having two shopping lists that disagree with each other. The fix was simple. I deleted yarn.lock and committed to npm for everything. One tool, one lock file, no conflicts.

By the end of that afternoon, I could read every command in my terminal and know what it was doing. I could not write them from memory, and I decided that was fine. Reading is the skill that matters. Writing comes from repetition.

Skip the mistakes

Pick npm or yarn, not both. They do the same job. Having both creates two lock files that will conflict and cause errors nobody can diagnose quickly. If you see a tutorial using yarn and your project uses npm, mentally replace yarn add with npm install and move on.

Read package.json before you do anything else in a new project. Open it. Look at the "scripts" section. Those are the commands you can run. Most projects have dev for local development and build for production. Everything else in the file is context, not action.

npm install is not scary. All it does is read the dependency list in package.json and download everything into a folder called node_modules. That folder is large, often hundreds of megabytes, and that is normal. It is also disposable. If something goes wrong with your dependencies, delete the entire node_modules folder and run npm install again. It will rebuild from scratch.

The difference between dev and build is the difference between a workshop and a factory. Dev is fast, messy, and shows you errors in the browser. Build is slow, thorough, and creates the exact output that will be deployed. If something works in dev but fails in build, the build error is the one that matters.

You do not need to memorize commands. You need to recognize them. When Claude Code suggests npm run build, you should know it is creating a production version of your site. You do not need to remember the exact syntax. You need to understand the intent. The terminal is a conversation, and reading is more important than speaking.

What's next

That is the complete foundation. You have a name, a brand, a domain, a workspace, a live site, a mental model of how it all connects, and a vocabulary for the tools. Now build the product.