Troubleshooting
The errors you can meet while installing or publishing 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 command again
docker build -t agency-portfolio ., thendocker run -p 3030:3030 agency-portfolio.
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 run, the last from yarn dev or yarn start. Another program already listens on port 3030: often an earlier run of the 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 :3030An earlier container shows in
docker ps.Stop it
Close that program, or stop the earlier run: Ctrl+C in its terminal, or
docker stopwith the container's ID. Then start the site again.Or run the site on another port
With Docker, change the number on the left of
-p. The number on the right stays3030: it is the port inside the container.Terminalinlanding-page-template-1docker run -p 3041:3030 agency-portfolioWithout Docker, pass the port to the script:
Terminalinlanding-page-template-1yarn dev -p 3041For a production build,
yarn start -p 3041.Expected result: The site answers on localhost:3041Local.
The Docker build fails
The first build downloads the Node.js 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. Run the command again once you are online; finished steps are cached.
- 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: build again without the cache.
landing-page-template-1docker build --no-cache -t agency-portfolio .The folder looks different
failed to read dockerfile: open Dockerfile: no such file or directoryThe command ran outside the template's folder. The ZIP holds one folder, landing-page-template-1, with the Dockerfile at its top. Some browsers unzip the download by themselves: then the folder is already in your downloads.
cd landing-page-template-1
lsls (or dir on Windows) lists Dockerfile, package.json, messages, public and src. Run the commands from there.
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 project pins Yarn 4 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 changed setting does nothing
NEXT_PUBLIC_SITE_URL and NEXT_PUBLIC_API_BASE_URL are written into the site when it is built. A running build keeps the values it was built with.
- Without Docker: put them in
.env.localin the project folder, not in.env.example. Restartyarn dev, or runyarn buildagain beforeyarn start. - With Docker: pass them as
--build-argtodocker buildand build again.docker run -edoes not change them. - On Vercel or another host: change the variable, then deploy again.
Shared links and previews point at localhost
The canonical link, the language links or a social preview card show http://localhost:3030. The site was built without NEXT_PUBLIC_SITE_URL, which falls back to that address. Set it to your public address, such as https://www.your-domain.com, and build again.
The contact form
- It says the message was sent, but nothing arrives:
NEXT_PUBLIC_API_BASE_URLis empty, so the form only shows its success message and sends nothing. Set it to your API's address and build again. - It shows "Something went wrong. Please try again.": the request to your API's
/contactpath failed. The browser's developer tools show why under Network: the API is not reachable, the path does not exist, it answered with an error, or it does not accept requests from your site's address (CORS).
The site opens in Arabic
An address without a language, such as /, follows the browser's language, so a browser set to Arabic gets /ar. Within one browser session it also returns to the last language opened, kept in a NEXT_LOCALE cookie. Open /en for English, or use the language switch in the navbar.
The mouse pointer disappears
That is the page's own cursor: on screens 768 pixels wide and more it hides the system pointer and draws a dot and a ring instead. To keep the normal pointer, see the custom cursor.
yarn lint warns that next lint is deprecated
The warning comes from Next.js 15.5 itself. yarn lint still runs ESLint on the code and reports its results as usual.