Skip to the article
Aniq-UI

SaaS TemplateTroubleshooting

Troubleshooting

The errors you can meet while installing, building or editing the site, what causes each one, and how to fix it.

Docker is not running

What you see
failed to connect to the docker API at unix:///…/docker.sock; check if the path is correct and if the daemon is running

Older Docker versions say "Cannot connect to the Docker daemon" instead. Either way, the Docker engine is not started.

  1. 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.

  2. Check that Docker answers

    Terminal
    docker info

    Expected result: It prints a Server section instead of an error.

  3. Run your command again

    docker build -t analytics-landing ., then docker run -p 3030:3030 analytics-landing.

A port is already in use

What you see
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 :::3030

The first two lines come from Docker, the last from yarn dev or yarn start. Another program already listens on port 3030: often an earlier run of this site, or another project's server.

  1. Find what holds the port

    On macOS or Linux:

    Terminal
    lsof -i :3030

    On Windows, in PowerShell:

    Terminal
    netstat -ano | findstr :3030
  2. Stop it

    Close that program, or stop the earlier run: Ctrl+C in its terminal, or docker stop with the container's ID from docker ps. Then start the site again.

  3. Or use another port

    Keep the other program and start the site on a free port, here 3041:

    How you run itCommand
    Dockerdocker run -p 3041:3030 analytics-landing
    Development serveryarn dev -p 3041
    Production buildyarn start -p 3041

    With Docker, change only the number on the left of -p: the site inside the container always listens on 3030.

    Expected result: The site answers on localhost:3041/enLocal.

The build fails

docker build stops with "failed to solve" and the step that failed; yarn build stops with the error itself. The usual causes:

  • No connection or a timeout: the build downloads the dependencies, and the DM Sans, Noto Sans Arabic and Almarai fonts from Google Fonts. A message such as "Failed to fetch DM Sans from Google Fonts." means the build could not reach them. Run the command again once you are online; with Docker, finished steps are cached.
  • `Invalid URL`: NEXT_PUBLIC_SITE_URL is not a full address. Write it with https://, such as https://www.your-domain.com.
  • 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.
Terminalin Nextjs-landing-page-template-2
docker build --no-cache -t analytics-landing .

Without Docker, delete the node_modules and .next folders, then run yarn install and yarn build again.

Yarn says its version is 1.22

What you see
This project's package.json defines "packageManager": "yarn@4.8.1…". 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 an old global Yarn answered instead.

Terminal
corepack enable

Then run yarn install again. Use Yarn rather than npm: yarn.lock is what keeps your install on the versions the template was tested with.

The corepack command is not found

What you see
corepack: command not found

Node.js 25 and newer no longer include Corepack. Install it once with npm, then turn it on:

Terminal
npm install -g corepack
corepack enable

Then run yarn install again. The same two commands fix yarn: command not found.

Node.js is too old

What you see
You are using Node.js 18.20.4. For Next.js, Node.js version ">=20.9.0" is required.

Next.js 16 needs Node.js 20.9 or newer. Check your version with node -v. Install Node.js 22 or 24, open a new terminal, run corepack enable again, then yarn install and yarn dev.

With Docker this does not apply: the image brings its own Node.js 24.

A changed setting does nothing

NEXT_PUBLIC_SITE_URL and the other NEXT_PUBLIC_ values are compiled into the site when it is built. Changing one changes nothing until the site is built again.

How you run itAfter changing a value
yarn devChange it in .env.local, stop the server and run yarn dev again.
yarn build and yarn startChange it in .env.local, run yarn build again, then yarn start.
DockerBuild the image again with the value as a --build-arg. The image build ignores .env and .env.local.
VercelChange it in the project's Environment Variables and deploy again.

yarn start fails, or shows an old version

What you see
Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server.

yarn start serves the last production build, from the .next folder. Run yarn build first, and again after every change.

If the site shows errors that do not match your code, often after you changed a dependency's version or BUILD_STANDALONE, delete the .next folder and build again:

Terminalin Nextjs-landing-page-template-2
rm -rf .next
yarn build

On Windows, in PowerShell, delete it with Remove-Item -Recurse -Force .next.

A form says it was sent, but nothing arrives

That is how the template ships. The forms check what visitors type and show their success message, but they send nothing anywhere until you connect each one you keep to your own service.

A new colour theme does not show in development

With yarn dev, a floating panel lets you preview the four colour themes, and the browser remembers the one you picked there. That choice wins over the theme set in the code. Pick the same theme in the panel, or clear the site data for localhost:3030 in your browser.

A production build, with yarn start or Docker, never shows the panel and always uses the theme set in the code.

The site opens in Arabic

Opening / sends a visitor to /ar when the browser prefers Arabic, and to /en otherwise. Choose the other language in the header's language menu, or open /en directly.

Some footer links, the social icons and the contact page's social links point to # placeholders. That is by design: they are yours to point at your own pages and profiles. The header, the pricing, blog and contact links, and the sign-up buttons already work.

The folder looks different

Run the commands inside the folder the ZIP extracts to, Nextjs-landing-page-template-2. It holds Dockerfile, package.json, yarn.lock, messages, public and src. 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.

Stuck on a step?

Find a fix before you start over.

Troubleshooting

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising.