You might run into the following error when building your application when using the @dynamic-labs/sdk-react-core package in a NextJS version 14.x project.

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Solution

Update next.config.js to optimize @dynamic-labs/sdk-react-core:

// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    optimizePackageImports: ["@dynamic-labs/sdk-react-core"],
  },
};

export default nextConfig;