> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Node.js (client-side) SDK 1.x to 2.0 migration guide

> This topic explains the API changes made in the client-side Node.js SDK 2 release and how to migrate to that version.

> For the complete documentation index, see [llms.txt](/llms.txt). For the full documentation snapshot, see [llms-full.txt](/llms-full.txt).

## Overview

This topic explains how to adapt code that currently uses a 1.x version of the [Node.js client-side SDK](/sdk/client-side/node-js) to use version 2.0 or later.

The changes in this release are mainly to update the SDK's platform compatibility and remove an unnecessary third-party dependency. The release does not change any existing APIs, and adds no new functionality except in the area of logging.

Before you migrate to 2.0, update to the latest 1.x version. To learn more about updating to the latest 1.x version, visit the [SDK's GitHub repository](https://github.com/launchdarkly/node-client-sdk/releases).

## Identifying Node.js versions for the 2.0 SDK

The 1.x version of the SDK is compatible with Node.js versions 12 and higher. LaunchDarkly no longer supports older Node.js versions, as is documented in the [End of Life policy](https://launchdarkly.com/policies/end-of-life-policy/).

LaunchDarkly also no longer supports some Node.js versions above 12 that are not long-term-support versions and have reached their end of life. To learn more, read the [Node.js releases page](https://github.com/nodejs/release#release-schedule).

## Understanding changes to dependencies

The SDK no longer has a dependency on the `winston` logging package. You can still use `winston`, but the SDK does not load it by default. To learn more, read [Understanding changes to logging](#understanding-changes-to-logging).

## Understanding changes to logging

Previously, if you did not specify your own logger in the [`logger`](https://launchdarkly.github.io/node-client-sdk/interfaces/LDOptions.html#logger) property, the SDK used [`winston`](https://www.npmjs.com/package/winston) to create a logger.

In versions 2.0 and higher of the SDK, if you do not specify your own logger, the SDK writes log output directly to the console. It uses the same format that it was previously using with `winston`, so you may not notice any difference.

If you want to use `winston`, you can still create a `winston` logger and put it in the SDK's `logger` property. This works exactly the same as before. The only difference is that you must make sure `winston` exists as a dependency in your project, instead of the dependency being provided automatically by the SDK.

The SDK also has a new option to allow configuring a simple logger without using `winston`. To learn more, read [`basicLogger`](https://launchdarkly.github.io/node-client-sdk/functions/basicLogger.html). This replaces the previous `createConsoleLogger`, which had slightly different parameters. If you were calling `ld.createConsoleLogger('warn')`, you would change that to `ld.basicLogger({ level: 'warn' })`.

## Understanding what was deprecated

All types and methods that were marked as deprecated/obsolete in the last 1.x release have been removed from the 2.0 release. If you were using these with a recent version previously, you should already have received deprecation warnings at build time or runtime, with suggestions about their recommended replacements.
