Deneb ReactJs documentation

Install and run

Install Node.js, install the packages, run the theme on your computer and build it for upload.

What you need

  • Node.js 20 or newer. Check with node -v. Get the LTS version from nodejs.org.
  • A code editor. Any editor works. VS Code is a good free choice.

Install

Unzip the theme, open the folder in your terminal, and run:

npm install

Run it while you work

npm run dev

Open http://localhost:3000. The page updates when you save a file. This includes changes to the Markdown and YAML files in content/.

Build the finished site

npm run build

This writes the finished site to the out/ folder. That folder is what you upload. See Deploy.

Preview the build

npm run start

This serves out/ on your computer, using npx serve out. Use it to check the real build before you upload. The first run may ask to install the serve tool.

The scripts

Command What it does
npm run dev Runs next dev, the development server
npm run build Runs next build, then node scripts/fix-export.mjs
npm run start Serves the out/ folder with npx serve out

Why the build has an extra step

npm run build runs scripts/fix-export.mjs after next build. Do not skip it.

Next.js 16 saves the small files it uses to prefetch pages in nested folders, for example about/__next.about/__PAGE__.txt. The browser asks for a flat name, about/__next.about.__PAGE__.txt. On a static host the flat name does not exist, so every link prefetch would fail with a 404. The script copies each nested file to the flat name next to it. It prints how many files it wrote.

Always build with npm run build, not with next build alone.

Problems

  • out/ not found: run next build first. The script ran before a build. Run npm run build.
  • Port 3000 is busy. Stop the other program. Next.js may pick another port and print it.
  • Old Node. If the install or build fails with strange errors, check that node -v shows 20 or higher.