Skip to main content

Next.js SDK Installation

Npm package version GitHub

Requirements

  • Minimum Next.js version: 14.1
  • Minimum React version: 18.2

Installation

To install the SDK, run the following command:

npm

npm install @devcycle/nextjs-sdk

yarn

yarn add @devcycle/nextjs-sdk

Typescript

If using Typescript with App Router, make sure to use a version which allows for asynchronous server components. The following minimum package versions are required:

  • Typescript: 5.1.3
  • @types/react: 18.2.8

For more details, see the Next.js documentation

You should also set the following setting in tsconfig.json:

{
"compilerOptions": {
...
"moduleResolution": "bundler"
}
}

This setting is the current default for new Next.js projects, and ensures that Typescript understands imports the same way that the Webpack bundler does.