# Updating npm Packages

> Update the TX Text Control Angular, React and Node.js npm packages to your backend's major version and handle peer dependency changes such as React 19.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Installation Guide > Upgrade Guide > Updating npm Packages
- **1046 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/npm/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/npm/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/npm/llms-full.txt

---

Updating the TX Text Control npm packages of an Angular, React or Node.js application starts with choosing the version that fits your backend. From there, you install a new major version and check which peer dependencies changed between versions.

### Match the Major Version of the Backend

The Document Editor and Document Viewer frontends for Angular and React, and the Node.js packages, are listed in [npm Packages](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/npm/llms-full.txt). They only contain the user interface, and every frontend needs a backend that runs TX Text Control .NET Server, so an update of the frontend usually goes together with an update of the backend's NuGet packages. See [Updating NuGet Packages](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/nuget/llms-full.txt).

Use the npm packages whose major version matches the TX Text Control .NET Server version of your backend: for a backend with the 34.x NuGet packages, the 34.x npm packages. When you upgrade the backend to a new major version, upgrade the npm packages to the same major version. [Package Versions and Product Versions](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/npm/#package-versions-and-product-versions) explains how the npm versions relate to the product version.

### Check for Updates

Run the following command in the folder of your frontend application:

```bash
npm outdated
```

`npm outdated` checks the registry for newer versions of the installed packages. The **Wanted** column shows the highest version that satisfies the version range in your `package.json`, and the **Latest** column shows the version tagged as latest. A new major version usually appears only in the **Latest** column, because the range in `package.json` does not include it.

To see all published versions of a package, or the peer dependencies of a specific version before you install it, use `npm view`:

```bash
npm view @txtextcontrol/tx-react-document-editor versions
npm view @txtextcontrol/tx-react-document-editor@34.0.0 peerDependencies
```

### Install a New Version

To update a package to a new major version, use `npm install`. The `update` command cannot install a newer major version. The following command installs the latest release of the Angular Document Editor:

```bash
npm install @txtextcontrol/tx-ng-document-editor@latest
```

To install a specific version, for example the version that matches your backend, pass the version number:

```bash
npm install @txtextcontrol/tx-react-document-editor@34.0.0
```

Update all TX Text Control packages of the application in the same way, then rebuild and test the frontend together with the updated backend.

### Peer Dependency Changes

The Angular and React packages declare the framework versions they work with as peer dependencies. Check them before you update, because a new major version of a TX Text Control package can require a newer Angular or React version. The ranges of the 32.x, 33.0 and 34.0 versions are listed in [Angular](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/npm/angular/#packages-and-supported-angular-versions) and [React](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/npm/react/#packages-and-required-react-versions) under Earlier Package Versions.

What this means for an upgrade:

- **React Document Editor.** Version 33.0.0 changed the peer dependency from React 18 to React 19, and version 34.0.0 requires React `^19.2.0`. Upgrade `react` and `react-dom` in your application before or together with the editor package.
- **React Document Viewer.** Version 34.0.0 still declares React `^18.2.0`. If you use the Document Editor and the Document Viewer in the same React application, compare the peer dependencies of both packages before you update.
- **Angular Document Editor.** Version 34.0.0 requires Angular 18.2.14 or higher and supports versions up to Angular 21. Applications on Angular 17 need to upgrade Angular first.
- **Angular Document Viewer.** Version 34.0.1 extends the supported range to Angular 21.

The Node.js packages `@txtextcontrol/tx-document-editor` and `@txtextcontrol/tx-websocket-server` have no peer dependencies.

### Frontend Code Changes

Besides the framework versions, check whether the new version changes the settings your frontend code uses. An example is the Document Viewer 32.2.1, which added support for PDF.js 4.0 and later: the `pdfjs` object of `documentLoadSettings` uses the properties `workerSourcePath` and `librarySourcePath`. [Breaking Changes](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/breaking-changes/llms-full.txt) shows the code for ASP.NET Core, Angular and React and lists the other changes per version.

### Next Steps

- [Breaking Changes](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/breaking-changes/llms-full.txt): the changes each major version requires.
- [npm Packages](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/npm/llms-full.txt): the npm packages and the backend they need.
- [React](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-editor/react/llms-full.txt) and [Angular](https://docs.textcontrol.com/tx-text-control-dotnet-server/getting-started/document-editor/angular/llms-full.txt): set up the Document Editor with the current packages.

---

## Nearby

- **Previous:** [Updating NuGet Packages](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/nuget/llms-full.txt)
- **Next:** [Breaking Changes](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/breaking-changes/llms-full.txt)
