> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed

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`:

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

export default nextConfig;
```
