# In gen.yaml
typescript:
  moduleFormat: dual
```

When using `moduleFormat: dual`, make sure the tsconfig.json is set up correctly:

```json
// In tsconfig.json
{
  "compilerOptions": {
    "moduleResolution": "node",
    "module": "esnext",
    "esModuleInterop": true
  }
}
```

There's a small bundle size tradeoff with dual format, but it's usually worth it for the compatibility benefits.

## Package manager differences - npm vs the world

The last common issue is package manager compatibility. Speakeasy uses npm when building SDKs, but a monorepo might use pnpm, Yarn, or even Bun.

### Why this is a problem

Different package managers handle dependencies differently. This can lead to subtle issues where the SDK works fine when generated, but breaks when integrated into the monorepo.

For example, one might see errors about missing dependencies that they know are installed, or weird resolution issues that only happen in the monorepo.

### How to fix it

Configure Speakeasy to use your preferred package manager when building the SDK. For pnpm (recommended for monorepos), customize the compile command in your `gen.yaml`:

```yaml