The Next.js version must be >= 13 for it to work with the Peaze SDK. This is because Next.js does not allow importing external CSS directly from node_modules. Luckily, Next.js >= 13 provides a new beta feature that allows packages to use their native CSS. Note that additional configuration is required and that this feature is in beta.

The following error will occur if your project is not configured correctly and/or is not using the correct version of Next.js.

Follow the steps below to make Next.js work with the Peaze SDK.

  1. Ensure that the Next.js version is >= 13.
  2. Configure the next.config.js and ensure that the experimental app feature is enabled.

Example next.config.js file:

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {appDir: true}, // This line of code enables the app directory

module.exports = nextConfig
  1. Create an app directory in the src folder and place the application code here.