# Storefront mode upgrade

The following steps must be completed to update to the newer ScandiPWA version:

1. [Update the version of `@scandipwa/scandipwa` ](/getting-started-1/updating-scandipwa/storefront-mode-upgrade.md#1-update-the-version-of-scandipwa-scandipwa)
2. [Update the `composer.json` dependencies](/getting-started-1/updating-scandipwa/storefront-mode-upgrade.md#2-update-the-composer-json-dependencies)
3. [Update the composer on the remote Magento server](/getting-started-1/updating-scandipwa/storefront-mode-upgrade.md#3-update-the-composer-on-the-remote-magento-server)

### 1. Update the version of `@scandipwa/scandipwa`&#x20;

Go to your ScandiPWA theme root directory and run the following:

{% tabs %}
{% tab title="Yarn" %}

```bash
yarn add @scandipwa/scandipwa@latest
```

{% endtab %}

{% tab title="NPM" %}

```
npm install @scandipwa/scandipwa@latest
```

{% endtab %}
{% endtabs %}

### 2. Update the `composer.json` dependencies

To update the Composer dependencies of your ScandiPWA theme, first, build or start the application:

{% hint style="warning" %}

### Heads up!

When upgrading, the build or start of the application might throw an error asking you to upgrade the `composer.json`! **This is expected.**
{% endhint %}

{% tabs %}
{% tab title="Yarn" %}

```bash
yarn start
```

{% endtab %}

{% tab title="NPM" %}

```
npm run start
```

{% endtab %}
{% endtabs %}

Complete the instructions indicated in error, for example following error:

![](/files/-MV0S24Co-_Np3a4mscy)

Must indicate, that you must bump the `scandipwa/customer-graph-ql` to a newer version (`^3`). You can do it in `composer.json`.

{% hint style="info" %}
Another way to quickly resolve this is to copy the `require` field of your theme's parent theme. This is, however, not safe as it might omit some extension's dependencies.
{% endhint %}

### 3. Update the composer on the remote Magento server

Update the `composer.json` on your Magento 2 server. You can again synchronize the updates from ScandiPWA theme's `require` field of `composer.json` and your Magento 2 server's root `composer.json`.

## Upgrade the CSA and CMA

To make sure all the features of the new ScandiPWA are working correctly, make sure to stay on the latest toolchains. Follow the guides below to upgrade them:

{% content-ref url="/pages/-MV0PVbl\_68pDcp4M0Up" %}
[CMA upgrade](/getting-started-1/updating-scandipwa/cma-upgrade.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MV0PXvo5UYb1Ij7LKNd" %}
[CSA upgrade](/getting-started-1/updating-scandipwa/csa-upgrade.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scandipwa.com/getting-started-1/updating-scandipwa/storefront-mode-upgrade.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
