# In .npmrc
shamefully-hoist=false
strict-peer-dependencies=true
```

If you're using Yarn or npm, you'll need to be more explicit:

```json
// With Yarn (in package.json)
{
  "resolutions": {
    "zod": "^3.22.4",
    "@tanstack/react-query": "^4.29.5"
  }
}

// With npm (in package.json)
{
  "overrides": {
    "zod": "^3.22.4",
    "@tanstack/react-query": "^4.29.5"
  }
}
```

This forces all packages to use the same version of these dependencies, preventing the confusion.

## Module format mismatches - ESM vs CommonJS chaos

The second most common issue is dealing with mixed module formats. Some packages use CommonJS, others use ESM, and a monorepo probably has a mix of both.

### Why this is a problem

You might see errors like:

```
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
```

Or:

```
SyntaxError: Cannot use import statement outside a module
```

These happen when module systems don't align. It's especially common when there's a package using CommonJS trying to import an ESM module, or vice versa.

### How to fix it

The simplest solution is to configure your Speakeasy SDK to use ESM format:

```yaml