---
title: "Prerequisites"
slug: "prerequisites"
abstract: "Check that you have the necessary Sitecore subscriptions and a compatible app, and prepare your development environment so you can get started with the Cloud SDK."
---
# Prerequisites

This topic describes what you need before you get started with the Cloud SDK and how to prepare your development environment.

Check that you have the following, before getting started:

- [Sitecore subscriptions](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/sitecore-cloud-sdk-for-javascript/cloud-sdk-comparison-charts.html "Cloud SDK comparison charts"), depending on your application requirements.
- [Node.js 18.17](https://nodejs.org/) or later. Check your installed version by using the `node --version` command.
- A Content SDK application based on the [starter kit](https://github.com/Sitecore/content-sdk/tree/dev/packages/create-sitecore-jss/src/templates/nextjs), or a JSS application based on one of the [XM Cloud Front End Application Starter Kits](https://github.com/sitecorelabs/xmcloud-foundation-head). For JSS, the [version of your JSS app](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/getting-started/prerequisites.html#UUID-eccb816d-ebc4-b673-349f-812cabcb5848_section-idm190146562814667390 "Compatibility with JSS") determines which version of the Cloud SDK to use.

    > [!note]
    > **XM Cloud is now SitecoreAI**
    > Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

    > [!important]
    > Although this documentation also describes using the Cloud SDK in a *standalone* Next.js application, you need a Content SDK or JSS app connected to SitecoreAI to use the SDK.

- If you plan to use the Cloud SDK `search` package to build search experiences, [create a support case in the Sitecore Cloud Portal](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/en/create-a-support-case.html) to connect your Sitecore Search instance to your SitecoreAI environment. This is to ensure that your Context ID contains the search resource. You'll use the Context ID when you [initialize](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/getting-started/install-and-initialize-the-cloud-sdk.html "Install and initialize the Cloud SDK") the SDK.

sidebar. Compatibility with JSS

The Cloud SDK is compatible with all versions of the [Content SDK](https://doc.sitecore.com/sai/en/developers/content-sdk/en/sitecore-content-sdk-for-sitecoreai.html), but not with all versions of the JSS.

The version of your JSS app determines which version of the Cloud SDK packages to install.

To make sure you install the correct version of Cloud SDK packages, check the version of the listed Cloud SDK dependencies in the `package.json` file of your JSS app. For example, the [JSS 22.7.0 `package.json` file](https://github.com/Sitecore/jss/blob/v22.7.0/packages/create-sitecore-jss/src/templates/nextjs-xmcloud/package.json) lists the Cloud SDK `core` package version `0.5.1` as a dependency:

```json
"@sitecore-cloudsdk/core": "^0.5.1"
```

In this case, make sure that all other Cloud SDK packages you install are also version `0.5.1`. If you install a previous or later version of a Cloud SDK package, some functionality might not work.

## Prepare your development environment

:::tab{title="JSS-Next.js"}

If you're using a Content SDK app based on the [starter kit](https://github.com/Sitecore/content-sdk/tree/dev/packages/create-sitecore-jss/src/templates/nextjs) or a JSS app based on the [XM Cloud Front End Application Starter Kits](https://github.com/sitecorelabs/xmcloud-foundation-head), with [JSS version 21.6](https://github.com/sitecorelabs/xmcloud-foundation-head/blob/main/headapps/nextjs-starter/package.json) or later, then your app is connected to SitecoreAI, and the Cloud SDK is already included in the `nextjs`, the `nextjs-starter`, and the `spa-starters/angular` apps, respectively.

> [!note]
> **XM Cloud is now SitecoreAI**
> Some code examples, images, and UI labels may still use XM Cloud while engineering assets are being updated.

To prepare your development environment:

1. [Set up your local development environment](https://doc.sitecore.com/xmc/en/developers/xm-cloud/en/set-up-your-local-development-environment.html) as part of getting started with front-end development in SitecoreAI.

    This involves setting environment variables in the `nextjs-starter` or the `spa-starters/angular` app, for example, [your Context ID and site name](https://doc.sitecore.com/sai/en/developers/jss/22/jss-sai/the-jss-xm-cloud-add-on-for-next-js.html#UUID-97b4d09f-5470-ad6f-5e06-30d41dad6204_section-idm4642926475296034002546447882).

2. [Install and initialize](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/getting-started/install-and-initialize-the-cloud-sdk.html "Install and initialize the Cloud SDK") Cloud SDK packages in your app. All your development work with the Cloud SDK will take place in the `nextjs-starter` or the `spa-starters/angular` app.

:::

### Enable debug logs

During development, we recommend that you enable debug logs for the Cloud SDK. This helps you trace code execution and diagnose errors, speeding up your work with the SDK.

::::tabs
:::tab{title="Browser side"}
To enable logs:

1. In your web browser, navigate to your app.
2. In your web browser's developer tools, in **Local Storage**, create a key called `debug`.
3. For the `debug` key, set `sitecore-cloudsdk:*` as the value.

> [!note]
> Logs related to browser-side SDK code will display in your web browser's developer tools, in the console.

:::
:::tab{title="Server side"}
To enable logs:

- In your source code, in the file where you load environment variables, such as `.env`, add the following key-value pair:

    ```text
    DEBUG=sitecore-cloudsdk:*
    ```

> [!note]
> Logs related to server-side code will display in your terminal.

:::::::
