# Syntax Error on autogenerated js minification file

**URL:** <https://community.hubspot.com/t/syntax-error-on-autogenerated-js-minification-file/30372>\
**Category:** CMS Development\
**Created:** [January 18, 2021, 7:50pm UTC](https://community.hubspot.com/t/syntax-error-on-autogenerated-js-minification-file/30372 "2021-01-18T19:50:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SaraRandolph](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sararandolph/32/98942_2.png) [@SaraRandolph](https://community.hubspot.com/u/SaraRandolph)\
**Post date:** [January 18, 2021, 7:50pm UTC](https://community.hubspot.com/t/syntax-error-on-autogenerated-js-minification-file/30372/1 "2021-01-18T19:50:10Z")

</div>

I have been successfully using the React CMS Boilerplate to upload a custom React Module in Hubspot. Recently, I went to do some updates on the module and I’m getting this error

`Uncaught SyntaxError: Invalid or unexpected token`

in the minified main.js file (this file is autogenerated and I can not edit it). The error appears to be on the very last line of the minified file which is

`\#sourceURL=[https://f.hubspotusercontent00.net/hubfs/{myHubspotID}/raw\_assets/public/{myHubspotFolder}/main.js``](https://f.hubspotusercontent00.net/hubfs/%7BmyHubspotID%7D/raw_assets/public/%7BmyHubspotFolder%7D/main.js%60%60)

I have not experienced this error ever before so I’m wondering if something changed with how Hubspot builds the minified files? I did control tests and use the **exact same** code that worked previously and saw the same error today. Also I will note that the uploading process has no errors. I’m only seeing the error when I drag my module onto our page. That is where it crashes.

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [January 19, 2021, 11:25am UTC](https://community.hubspot.com/t/syntax-error-on-autogenerated-js-minification-file/30372/2 "2021-01-19T11:25:17Z")

</div>

Hi @SaraRandolph

Welcome to the Community and thank you for the information provided!

I’ll tag a few of our wizards that can share their knowledge with you 🙂

Hey @Kevin-C @Gonzalo @DanielSanchez any advice you can give to @SaraRandolph?

Thanks

Sharon

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [January 19, 2021, 3:03pm UTC](https://community.hubspot.com/t/syntax-error-on-autogenerated-js-minification-file/30372/3 "2021-01-19T15:03:49Z")

</div>

Hey @SaraRandolph

A shot in the dark here, but…

I believe a sourceURL is supposed to be designated with two forward slashes rather than two back slashes.

This would account for the

**Uncaught SyntaxError: invalid escape sequence error**

thrown in FF.

But because that’s causing an error with the source mapping I’m not sure I can tell where this is happening. If this is in fact the issue.

**EDIT:**

If you can get into that fileafter the production build and remove that line all together it might work.

---

<div class="post-metadata">

**Author:** ![SaraRandolph](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sararandolph/32/98942_2.png) [@SaraRandolph](https://community.hubspot.com/u/SaraRandolph)\
**Post date:** [January 19, 2021, 10:01pm UTC](https://community.hubspot.com/t/syntax-error-on-autogenerated-js-minification-file/30372/4 "2021-01-19T22:01:17Z")

</div>

Thank you Kevin! I ended up chatting with a developer on the Hubspot slack asking how I could update that file and he pushed up a fix for the issue!
