Skip to main content
Frontend tutorial

2.1. Run it on your computer

Time to leave the browser. Open a terminal and check your tools. Use Node 24:

node --version
git --version
pnpm --version

No Node 24 yet? Don't take it from the website. Install pnpm with the standalone script from its installation page and let it bring Node: pnpm runtime set node 24 -g. If you already have Node 24 and only pnpm is missing, npm install -g pnpm is enough.

Now bring the shipment list from 1.1 to your computer. These commands clone its finished version. Work locally in lesson 1.1 shows how to continue from your own code instead.

git clone --depth 1 \
--branch lesson-01-01-shipment-shape-solution-v6 \
https://github.com/adam-zielonka/frontend-tutorial.git \
shipments
cd shipments
git switch -c my-work
pnpm install
pnpm dev

Open the address Vite prints. The Network one also works on a phone or a scanner in the same network.

Open the folder in VS Code. In src/shipments.ts, make S-102 express too, but misspell it:

src/shipments.ts
{
id: 'S-102',
customer: 'Harbor Foods',
pallets: 5,
status: 'loading',
priority: 'expres',
},

The page shows expres without complaint, because Vite doesn't check types. VS Code underlines it straight away, and the build fails:

pnpm build
src/shipments.ts:22:5 - error TS2820: Type '"expres"'
is not assignable to type '"standard" | "express"'.
Did you mean '"express"'?

Fix the typo and run pnpm build again. Then look at what you changed and save it:

git diff
git commit -am "Make S-102 express"

If Git asks who you are, tell it once: git config --global user.name "Your Name" and git config --global user.email you@example.com. That's your first commit.

02 / Tools around development

localhost:5173
The shipment list running locally: S-101 express, S-102 expres with the typo outlined, S-103 standard.

Vite shows the typo without complaint. pnpm build doesn't.