CMS Development

SaraRandolph
Participant

Syntax Error on js minification file

SOLVE

I have been successfully using the React CMS Boilerplate to upload a custom React Module in Hubspot. Today, 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. 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`

 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. 

0 Upvotes
1 Accepted solution
SaraRandolph
Solution
Participant

Syntax Error on js minification file

SOLVE

I ended up chatting with a devloper on the Hubspot Slack and he was able to push up a fix for this. Thank you for all your support everyone! 

View solution in original post

4 Replies 4
SaraRandolph
Solution
Participant

Syntax Error on js minification file

SOLVE

I ended up chatting with a devloper on the Hubspot Slack and he was able to push up a fix for this. Thank you for all your support everyone! 

dennisedson
HubSpot Product Team
HubSpot Product Team

Syntax Error on js minification file

SOLVE

@tjoyce ,

Have you seen this happen before with React in HubSpot?

dennisedson
HubSpot Product Team
HubSpot Product Team

Syntax Error on js minification file

SOLVE

Hey @SaraRandolph 

Are you still having this issue? 

0 Upvotes
SaraRandolph
Participant

Syntax Error on js minification file

SOLVE

Hi @dennisedson I just tried it again and I am having the same issue. 

0 Upvotes