# Common Issues

## Required parameter 'theme\_dir' was not passed

![](https://1705439005-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MOVnS5lKxiIvOL9no4d%2Fuploads%2FAZmsPdo3mvf9Xl8s9qiT%2FScreenshot_20211202_002513.png?alt=media\&token=e05f743d-4f8f-4cf6-80b3-cdde33030d5f)

The issue appears when you have an incorrect theme path in the theme configuration in the database.

To fix the issue follow the steps below:

1. Connect to your database using the database client. (like [Beekeeper Studio](https://www.beekeeperstudio.io/))

   You can get host, port and credentials after running the [status](https://docs.create-magento-app.com/getting-started/available-commands/status) command.
2. Open `core_config_data` table and find a row with `design/theme/theme_id` path value.
3. Open `theme` table and find a row with `theme_id` value corresponding to `value` from the previous step.
4. Make sure that `theme_path` value is the same as the one declared in your theme's `registration.php` file. (for ScandiPWA it will be likely `scandipwa/scandipwa`)

## SQLSTATE\[HY000] \[2002] No such file or directory

An error message should look like this:

```
Response: SQLSTATE[HY000] [2002] No such file or directory

In InstallCommand.php line 274:
                               
Parameter validation failed  
                               

setup:install ...
```

This issue happens when `env.php`  file is missing.

Run [start](https://docs.create-magento-app.com/getting-started/available-commands/start) command the second time.

## SQLSTATE\[HY000] \[2006] MySQL server has gone away

{% hint style="info" %}
Should not appear on **magento-scripts@>=1.3.0**.
{% endhint %}

```
Response: SQLSTATE[HY000] [2006] MySQL server has gone away

In InstallCommand.php line 274:
                               
Parameter validation failed


setup:install ...
```

This issue might appear at the first start of the project.

Run [start](https://docs.create-magento-app.com/getting-started/available-commands/start) command the second time.

## The default website isn't defined. Set the website and try again.

{% hint style="info" %}
Should not appear on **magento-scripts@>=1.4.0**.
{% endhint %}

This issue might appear if you, for some reason, have no Magento database installed in MySQL.

Delete `app/etc/env.php` file, after that run [start](https://docs.create-magento-app.com/getting-started/available-commands/start) command.\
This will force CMA to reinstall Magento but you will lose some configuration, for example, a persisted query that is required for the ScandiPWA theme.

## Connection to Redis localhost:port failed after 1 failures. Connection refused.

{% hint style="info" %}
Should not appear on **magento-scripts@>=1.3.1**.
{% endhint %}

This issue might appear if your port configuration has changed but Magento still uses old configuration.

There are 2 options on how to solve such a problem:

* Get current port configuration from `docker ps` or [status](https://docs.create-magento-app.com/getting-started/available-commands/status) command and edit `app/etc/env.php` file and run the [start](https://docs.create-magento-app.com/getting-started/available-commands/start) command.&#x20;

{% hint style="success" %}
&#x20;**Recommended,** as it is the safest option.
{% endhint %}

* Delete  `app/etc/env.php` file and run the [start](https://docs.create-magento-app.com/getting-started/available-commands/start) command.

{% hint style="danger" %}
**Not recommended,** because you will lose **all** the configuration from that file.
{% endhint %}

## Redis is not configured for persistent queries.

{% hint style="info" %}
Should not appear on **magento-scripts@>=1.6.0**
{% endhint %}

This issue might appear if you have a theme installed but persisted queries are not set up for some reason.

Run [link](https://docs.create-magento-app.com/getting-started/available-commands/link) command to re-link the theme and setup persisted queries.

## There are no commands defined in the "config" namespace.

This issue might appear if you have previously installed Magento with CMA but now lost all the data in MySQL for some reason.

Delete `app/etc/env.php` and run the [start](https://docs.create-magento-app.com/getting-started/available-commands/start) command again.
