---
title: "Fixing the _Symbol$iterator ReferenceError"
canonical_url: "https://www.nutrient.io/guides/web/troubleshooting/fixing-symbol-iterator-error/"
md_url: "https://www.nutrient.io/guides/web/troubleshooting/fixing-symbol-iterator-error.md"
last_updated: "2026-06-10T10:26:37.728Z"
description: "How to resolve the _Symbol$iterator4 ReferenceError when using Nutrient Web SDK with bundlers that modify polyfill behavior."
---

When using Nutrient Web SDK 1.9+ with certain build configurations, you encounter this runtime error:

```

ReferenceError: _Symbol$iterator4 is not defined

```

## Cause

Your build tool's polyfill transformations (Babel/core-js) conflict with the SDK's internal code.

## Solution

Update `core-js` and import polyfills explicitly before loading the SDK:

```bash

npm install core-js@^3.47.0 regenerator-runtime

```

At the top of your entry file (`index.js`, `main.ts`, or `App.jsx`):

```javascript

// These must be the first imports
import "core-js/stable";
import "regenerator-runtime/runtime";

import NutrientViewer from "pspdfkit";

NutrientViewer.load({
  container: "#pspdfkit",

  document: "document.pdf",
}).then((instance) => {
  console.log("Nutrient loaded", instance);
}).catch((error) => {
  console.error("Failed to load:", error.message);
});

```

If using Babel, configure `babel.config.js`:

```javascript

module.exports = {
  presets: [
    [
      "@babel/preset-env",
      {
        useBuiltIns: "entry",
        corejs: "3.47",
      },
    ],
  ],
};

```

## Alternative: Exclude SDK from transpilation

### Webpack

```javascript

// webpack.config.js
module.exports = {
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: [/node_modules/, /pspdfkit/],
        use: "babel-loader",
      },
    ],
  },
};

```

### Vite

```javascript

// vite.config.js
export default {
  optimizeDeps: {
    exclude: ["pspdfkit"],
  },
};

```

## Still not working?

1. Check for multiple `core-js` versions:

   ```bash

   npm ls core-js
   ```

2. Clean install:

   ```bash

   rm -rf node_modules package-lock.json
   npm install
   ```

3. Test with a [Nutrient catalog example](https://www.nutrient.io/guides/web/downloads.md) to isolate environment issues.

4. [Contact Support](https://support.nutrient.io/hc/en-us/requests/new) with your SDK version, `package.json`, and bundler config.

## Limitations

- Verified on Web SDK 1.9.1. Other versions not yet tested.

- Framework-specific integrations (Next.js, Nuxt, Angular CLI) require additional configuration.
---

## Related pages

- [Bug Reporting](/guides/web/troubleshooting/bug-reporting.md)
- [Chunkloaderror During Pspdfkit To Nutrient Migration In Ember](/guides/web/troubleshooting/chunkloaderror-during-pspdfkit-to-nutrient-migration-in-ember.md)
- [Content Security Policy](/guides/web/troubleshooting/content-security-policy.md)
- [Debug Logging](/guides/web/troubleshooting/debug-logging.md)
- [This will make the current directory contents available through `http://0.0.0.0:5000`.](/guides/web/troubleshooting/common-issues.md)
- [Fixing Split Undefined Error With Npm Build](/guides/web/troubleshooting/fixing-split-undefined-error-with-npm-build.md)
- [npm](/guides/web/troubleshooting/nightlies.md)
- [Testing Troubleshooting](/guides/web/troubleshooting/testing-troubleshooting.md)
- [Typescript](/guides/web/troubleshooting/miscellaneous/typescript.md)
- [Webassembly Simd Support](/guides/web/troubleshooting/webassembly-simd-support.md)

