---
title: "TypeScript SDK Bundling Troubleshooting"
description: "Fix common bundling issues with the Nym TypeScript SDK: WASM files missing from output, web worker configuration for Webpack and other bundlers."
schemaType: "TechArticle"
section: "Developers"
lastUpdated: "2026-03-15"
---

# Troubleshooting

import { Callout } from 'nextra/components';

## Bundling issues

### WASM and web worker not included in output bundle (Webpack)

You might need to use the CopyPlugin by adding this to your Webpack config:

```js
const CopyPlugin = require('copy-webpack-plugin');

module.exports = {
    plugins: [
        new CopyPlugin({
            patterns: [
              {
                from: path.resolve(path.dirname(require.resolve('@nymproject/mix-fetch/package.json')), '*.wasm'),
                to: '[name][ext]',
              },
              {
                from: path.resolve(path.dirname(require.resolve('@nymproject/mix-fetch/package.json')), '*worker*.js'),
                to: '[name][ext]',
              },
          ],
        }),
    ],
}
```

`require.resolve('@nymproject/mix-fetch/package.json')` finds the disk location of the Nym SDK package. `path.dirname` resolves the directory, and the `*.wasm` glob matches the WASM files. Use `[name][ext]` to preserve the output filename, because the package expects it to stay the same.

### ESM not supported

If your bundler does not support ECMAScript Modules (ESM), CommonJS packages are supported for most parts of the SDK.

For those that don't have ESM versions, you will need to use a tool like [Babel](https://babeljs.io/) to convert ESM to CommonJS.

### CSP prevents loading

If you are using a `*-full-fat` package, or if you inline WASM or web workers, you may not be able to load them if the [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) prevents WASM from being instantiated from a string.

You'll have to experiment with either adjusting the CSP or use another variant that is unbundled.

## Mixnet client issues

### Insufficient topology error

The mixnet client will complain about insufficient topology in the following cases:
- There are empty mix layers (rare)
- The gateway you've registered with does not appear in the network topology; it is either unbonded or was blacklisted
- The gateway you want to send packets to does not appear in the network topology; it is either unbonded or was blacklisted

To avoid the last two, make sure the gateway you are using is bonded and whitelisted.

### Checking gateway status

Your client address has the format: `client-id.client-dh@gateway-id`

For example: `DpB3cHAchJi...suko.ANNWrvHq...U2Vx@2BuMSfMW...3SEh`

- First part: client's identity key
- Second part: client's Diffie-Hellman key
- After `@`: gateway's identity key. Search for this in the [Nym Explorer](https://nym.com/explorer) to check its status
