---
description: >-
title: Troubleshooting and FAQ
version: 11.18.1+HEAD.34c1023246
generatedAt: 2026-11-24T14:48:19.149Z
checksum: 090b7d977ba4be5e2c4c04d199a30a4048416c59f443a56985df2f80629d9c40
---

# Troubleshooting and FAQ

## Visual tests and Vitest browser mode

Screenshot tests run with [Vitest browser mode](https://vitest.dev/guide/browser/) and use Playwright as the browser provider under the hood. The helper in `core/vitest-screenshots/` drives a single Firefox page per worker against the running portal on `http://localhost:8000`. The screenshot config sets `fileParallelism: true`, so test files run in parallel across workers while tests inside a file run sequentially on the same page.

### Installing screenshot browser

For running screenshot tests (visual tests), a headless Firefox browser is needed.

In normal circumstances, the browser will be installed automatically via `yarn install` – but to either upgrade to a newer version, or to wipe out existing versions and run the install manually, you can run these commands, depending on your needs:

```
yarn workspace @dnb/eufemia playwright uninstall --all
yarn workspace @dnb/eufemia add -D @playwright/test
yarn workspace @dnb/eufemia playwright install firefox

yarn workspace dnb-design-system-portal playwright uninstall --all
yarn workspace dnb-design-system-portal add -D @playwright/test
yarn workspace dnb-design-system-portal playwright install firefox
```

#### Alternative install: behind a corporate proxy

A proxy that re-signs HTTPS traffic can make the install fail with
`Error: unable to get local issuer certificate`. Point Node.js to your organization's root
certificate (a PEM file from your IT department) and run the install again:

```
NODE_EXTRA_CA_CERTS=/path/to/root-ca.pem yarn workspace @dnb/eufemia playwright install firefox
```

#### Alternative install: manually

Or, in the very worst case, you can manually download the zip file that `yarn workspace
@dnb/eufemia playwright install firefox` attempts to download, and extract the file
("Nightly" for Firefox) to the folder indicated when `yarn test:screenshots` fails.

## How can I run all screenshot tests in CI?

By default, CI runs only affected screenshot tests based on changed files and reverse dependencies. If a global style change is detected, all screenshot tests are run.

To force all screenshot tests, include `--run-all` in your commit message:

```bash
git commit -m "feat: implement new feature --run-all"
```

CI does not stop on the first failure, so a run reports all visual differences at once.

### What does `build:mini` do?

When running `build:mini` scripts, the build will be faster and the output will be smaller. It's used for the CI/CD pipeline to build the package for the documentation preview.

## Dependency issues

### Yarn patches

- We patch `eslint-plugin-import-x` 4.17.1 so that it works with minimatch 11. The root `resolutions` move minimatch 9 and 10 to 11 for a security fix, and minimatch 11 no longer exports `makeRe`, which the plugin's `no-internal-modules` rule imports. Without the patch, ESLint fails to start with `does not provide an export named 'makeRe'`. The patch is a port of [un-ts/eslint-plugin-import-x#570](https://github.com/un-ts/eslint-plugin-import-x/pull/570). It lives in `.yarn/patches/` and is applied by the `eslint-plugin-import-x@npm:4.17.1` entry in the root `resolutions`. Remove the patch and that entry when a plugin release includes the fix. If you change the plugin version, `yarn lint:resolutions` fails until you update or remove the entry.

### Babel

- Due to this bug: https://github.com/babel/babel/issues/11394 we add `.png,.snap` so they do not get copied: `--extensions '.js,.ts,.tsx,.png,.snap'`
