> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Work with npm Packages

## Article: Work with npm Packages

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/developer-environment/packages/work-with-npm-packages.md

## Article Content:

# Work with npm Packages

You can install [npm packages](https://dev.wix.com/docs/studio-two/code-your-site/developer-environment/packages/about-npm-packages.md) for use in a Studio Two site's code. Manage packages directly from the terminal in the **Code** tab. There is no separate package manager UI.

## Install an npm package

Before using an npm package, you need to install it.

<blockquote class="important">

**Important:**
By installing an npm package, you agree to the package's license agreement.

</blockquote>

To install an npm package:

1. In the Studio Two editor, open the **Code** tab.
2. Open the terminal. Press **Cmd+J** (Mac) or **Ctrl+J** (Windows/Linux), or click the panel toggle button in the top-right toolbar of the Code tab.
3. In the terminal, run:
   ```bash
   npm install <package-name>
   ```
   The editor automatically saves changes to `package.json` and `package-lock.json` after the install completes.
5. Open `package.json` in your project to confirm the package appears in the dependencies.
6. Find usage instructions in the package's README file, available at [npmjs.com](https://www.npmjs.com/).

You can then import the package in a site's code:

```ts
import something from '<package-name>';
```

## Install a specific version

To install a specific version of a package, append `@<version>` to the package name:

```bash
npm install <package-name>@<version>
```

You can find available versions on the package's page at [npmjs.com](https://www.npmjs.com/).

## Update a package

<blockquote class="important">

**Important:**
After updating a package, make sure your code is compatible with the new version.

</blockquote>

To update a package to its latest compatible version:

1. Open the terminal (**Cmd+J** on Mac, **Ctrl+J** on Windows/Linux).
2. Run:
   ```bash
   npm update <package-name>
   ```
3. Open `package.json` to confirm the updated version.

## Uninstall a package

<blockquote class="warning">

**Warning:**
When you uninstall a package, update any code that relies on it.

</blockquote>

To uninstall a package:

1. Open the terminal (**Cmd+J** on Mac, **Ctrl+J** on Windows/Linux).
2. Run:
   ```bash
   npm uninstall <package-name>
   ```
3. Open `package.json` to confirm the package no longer appears in the dependencies.

## See also

- [About npm Packages](https://dev.wix.com/docs/studio-two/code-your-site/developer-environment/packages/about-npm-packages.md)