---
title: "Get started"
slug: "get-started-1523436"
abstract: "How to prepare the JavaScript SDK for use with Content Hub."
---
# Get started

To use the JavaScript SDK, import the JavaScript SDK package into your projects. In this documentation, we use [Visual Studio Code](https://code.visualstudio.com/) as the editor and npm as the package manager.

> [!important]
> There is no longer a requirement to set up an npm feed. If you previously retrieved a package from the public feed, first clean up your configuration by running the command `npm config delete @sitecore:registry` or by removing the line that begins with `@sitecore:registry` from the *npmrc* file.

## Install the package

To install the JavaScript SDK, run the following command:

```shell
npm install @sitecore/sc-contenthub-webclient-sdk

```

> [!warning]
> You must configure the default npm registry, in addition to the Sitecore public feed, because the JavaScript SDK package depends on other npm packages from the default npm registry.

How you import the library depends on whether your project uses CommonJS or ECMAScript Modules (ESM).

### If using CommonJS

Import the SDK with `require`:

```text
const sdk = require('@sitecore/sc-contenthub-webclient-sdk');

```

You must either remove `"type": "module"`, or set it to `"commonjs"`.

### If using ESM

Import the SDK with `import`:

```text
import sdk from '@sitecore/sc-contenthub-webclient-sdk';

```

You must also set `"type": "module"` in your `package.json`.