# Receiving SyntaxError from auth0-react package

**URL:** <https://community.auth0.com/t/receiving-syntaxerror-from-auth0-react-package/117087>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [September 25, 2023, 3:53pm UTC](https://community.auth0.com/t/receiving-syntaxerror-from-auth0-react-package/117087 "2023-09-25T15:53:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwood](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dwood/32/71478_2.png) [@dwood](https://community.auth0.com/u/dwood)\
**Post date:** [September 25, 2023, 3:53pm UTC](https://community.auth0.com/t/receiving-syntaxerror-from-auth0-react-package/117087/1 "2023-09-25T15:53:09Z")

</div>

Greetings, I am working jsbundling-rails and webpack 5.88.2 – I also use babel-loader package for handling transpiling. I’m receiving an issue where auth0 is breaking in the view. The full log output is below. How can I get esm to work with webpack 5?

```auto
Uncaught SyntaxError: Invalid or unexpected token (at auth0-react.esm.js:120:65372)
at ./node_modules/@auth0/auth0-react/dist/dist/auth0-react.esm.js

```

---

<div class="post-metadata">

**Author:** ![dwood](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dwood/32/71478_2.png) [@dwood](https://community.auth0.com/u/dwood)\
**Post date:** [September 25, 2023, 4:00pm UTC](https://community.auth0.com/t/receiving-syntaxerror-from-auth0-react-package/117087/2 "2023-09-25T16:00:11Z")

</div>

Forgot to add the version of auth0  
@auth0/auth0-react ^1.6.0

---

<div class="post-metadata">

**Author:** ![dwood](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dwood/32/71478_2.png) [@dwood](https://community.auth0.com/u/dwood)\
**Post date:** [September 25, 2023, 4:15pm UTC](https://community.auth0.com/t/receiving-syntaxerror-from-auth0-react-package/117087/3 "2023-09-25T16:15:26Z")

</div>

babel-loader required some extra configs to pickup esm modules

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 9, 2023, 4:16pm UTC](https://community.auth0.com/t/receiving-syntaxerror-from-auth0-react-package/117087/4 "2023-10-09T16:16:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
