# Auth0 when using Worker-Plugin and React

**URL:** <https://community.auth0.com/t/auth0-when-using-worker-plugin-and-react/63230>\
**Category:** Get Help\
**Created:** [May 23, 2021, 3:58pm UTC](https://community.auth0.com/t/auth0-when-using-worker-plugin-and-react/63230 "2021-05-23T15:58:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebro](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sebro/32/29571_2.png) [@sebro](https://community.auth0.com/u/sebro)\
**Post date:** [May 23, 2021, 3:58pm UTC](https://community.auth0.com/t/auth0-when-using-worker-plugin-and-react/63230/1 "2021-05-23T15:58:08Z")

</div>

Hi

I have a problem with Auth0 wih worker-plugin and React (with removing Auth0 everything is ok).

Here is the error

```
./node_modules/@auth0/auth0-react/dist/auth0-react.esm.js
Module parse failed: Cannot read property 'length' of undefined
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.

```

… and my babel config (with react-app-rewired)

```
config.module.rules.push({
    exclude: /node_modules/,
    test: /\.worker\.js$/,
    use: [
        {
        loader: "babel-loader",
            options: {
                presets: ["@babel/preset-react"],
                plugins: ["@babel/plugin-syntax-jsx", "inline-json-import", "transform-class-properties", '@babel/plugin-transform-flow-strip-types'],
            },
        },
    ],
});
config.plugins.push(new WorkerPlugin({
    preserveTypeModule:true
}));

```

If you would have any ideas it would be great  
Thanks  
S

---

<div class="post-metadata">

**Author:** ![sebro](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sebro/32/29571_2.png) [@sebro](https://community.auth0.com/u/sebro)\
**Post date:** [May 23, 2021, 4:50pm UTC](https://community.auth0.com/t/auth0-when-using-worker-plugin-and-react/63230/2 "2021-05-23T16:50:17Z")

</div>

It was due to a case from worker-plugin, here is the PR [Fix `Module parse failed: Cannot read property 'length' of undefined` by jebbench · Pull Request #94 · GoogleChromeLabs/worker-plugin · GitHub](https://github.com/GoogleChromeLabs/worker-plugin/pull/94).

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 24, 2021, 10:05am UTC](https://community.auth0.com/t/auth0-when-using-worker-plugin-and-react/63230/3 "2021-05-24T10:05:41Z")

</div>

Perfect and thanks for sharing it with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 27, 2021, 11:53am UTC](https://community.auth0.com/t/auth0-when-using-worker-plugin-and-react/63230/4 "2021-05-27T11:53:33Z")

</div>


