Troubleshooting
The errors you can meet while installing and changing the site, what causes each one, and how to fix it.
Docker is not running
failed to connect to the docker API at unix:///…/docker.sock; check if the path is correct and if the daemon is runningOlder Docker versions say "Cannot connect to the Docker daemon" instead. Either way, the Docker engine is not started.
Open Docker Desktop
Start Docker Desktop and wait until it reports that the engine is running. On Linux, start the service:
sudo systemctl start docker.Check that Docker answers
Terminaldocker infoExpected result: It prints a Server section instead of an error.
Run your commands again
Run
docker build -t company-site ., thendocker run -p 3030:3030 company-site.
A port is already in use
Bind for 0.0.0.0:3030 failed: port is already allocated
ports are not available: exposing port TCP 0.0.0.0:3030 … bind: address already in use
Error: listen EADDRINUSE: address already in use :::3030The first two lines come from Docker, the last from yarn dev or yarn start. Another program already listens on 3030: often an earlier run of this site, or another project's dev server.
Find what holds the port
On macOS or Linux:
Terminallsof -i :3030On Windows, in PowerShell:
Terminalnetstat -ano | findstr :3030Stop it
Close that program, or stop the earlier run: Ctrl+C in its terminal, or
docker stopfor a container you started withdocker run. Then start the site again.Or run the site on another port
With Docker, keep
3030on the right of-pand change the number on the left:Terminalinlanding-page-template-3docker run -p 3041:3030 company-siteWithout Docker, give Yarn the port, or use
yarn start -p 3041for the production build:Terminalinlanding-page-template-3yarn dev -p 3041Expected result: The site answers on its new port, here localhost:3041Local.
The build fails
The first Docker build downloads the base image and every dependency, then builds the site. It stops with "failed to solve" and the step that failed when something gets in the way.
- No connection or a timeout: the build needs internet access, for the dependencies and for the Inter and Noto Sans Arabic fonts that
next/fontdownloads. Run the command again once you are online; finished steps are cached. - A message that a font could not be fetched from Google Fonts: the same cause, also with
yarn build. Check thatfonts.googleapis.comis reachable from your network. - No space left on device: free space in Docker Desktop, or check what Docker uses with
docker system df. - It fails at the same step every time: rebuild without the cache.
landing-page-template-3docker build --no-cache -t company-site .If yarn build stops on a type or lint error after your changes, yarn typecheck and yarn lint show the file and the line.
Yarn says its version is 1.22
This project's package.json defines "packageManager": "yarn@4…". However the current global version of Yarn is 1.22…The folder pins Yarn 4 in package.json, through Corepack. This message means Corepack is not enabled yet, so the old global Yarn answered instead.
corepack enableThen run yarn install again. If your Node.js has no Corepack, install it first with npm install -g corepack.
A change to the site's address does nothing
NEXT_PUBLIC_SITE_URL is compiled into the build. Changing .env changes nothing until the site is built again.
| How you run it | After changing the value |
|---|---|
yarn dev | Stop it and run yarn dev again. |
yarn build and yarn start | Run yarn build again, then yarn start. |
docker build | Build the image again with the value as a --build-arg. Docker does not read .env. |
| Vercel | Change it in the project's Environment Variables, then redeploy. |
Some pictures or logos do not show
The portraits and the blog and feature photos load from images.unsplash.com, and most logos from cdn.simpleicons.org. Without internet access, or on a network that blocks those hosts, they stay empty.
A picture you point at another website needs its host in images.remotePatterns in next.config.mjs, then a restart of yarn dev or a new build. If Simple Icons stops serving a brand, save its logo in public/images/logos/ and point to that file, as the code already does for Slack and Salesforce.
A button or link does nothing
That is how the sample ships: the buttons have no destination, and most links point at #. Give each one its address before you publish.
An address shows the 404 page
The site has one page, in two languages: /en and /ar. Any other address answers 404 until you add that language or that page.
The folder looks different
Run the commands inside the folder the ZIP extracts to. If the unzip command is missing, extract it with your file manager instead; some tools add an extra folder named after the ZIP, so move into the inner one.
The right folder is landing-page-template-3, with Dockerfile, package.json, messages, public and src at its top.