Uncaught SyntaxError: Cannot use import statement outside a module - Is this error on my end?

Description

Having an issue that I cannot figure out.
I am getting this error: “Uncaught SyntaxError: Cannot use import statement outside a module”
And this is the line it is referencing: “import {a as c} from “./dist/chunk-J3PPETVR.js”;”

All Finsweet functionality on the page has stopped working. I have made no changes to the page. This was working fine and has now stopped suddenly. I don’t think we’ve added anything to the site to affect this (no custom code, etc…).

Is anyone available to take a look at this? And help me identify the problem?

Site URL

Required: Please provide a staging/production URL where we can see the issue

Steps to Reproduce

  1. NA - You can see the error in the console…

Expected Behavior

No syntax errors in attributes.js files…

Actual Behavior

There are errors that might not be on our side??

Video/Screenshots

Required: Please provide a short screen recording showing the issue

  • Video link: No videos, sorry. This was functioning perfectly until about a couple days/one week ago (I am not exactly sure when this started breaking).

Additional Context

  • Browser: Chrome
  • Device: Macbook/All

NDA Notice: If you’re under an NDA, please feel free to send us a Direct Message/Email with the above information.

@Support-Finn @Support-Luis @Support-Pedro

Hey folks, just tagging you here. I just upgraded to paid support today and have a client that is really looking for answers. Hope you don’t mind the bumps. Appreciate your assistance!

Hey @thisiserikarad! I am taking a look! I’ll get back to you in a bit!

@Support-Luis Thank you so much! Thank you for dealing with all my tagging. Really do appreciate your help and time!

@thisiserikarad no worries!

I think I’ve found the issue! Have you modified your Consent Manager recently? It seems it is tagging our script and preventing it from running correctly.

I have double checked and there have been no updates from our end that could cause this issue and the error you are reporting is not showing in the console on our example page

I will check with our team! Thank you for this lead!

@Support-Luis Could you let me know what script that is running? Sorry if this is a newbie question. I think I see this in their code but I am unsure.

<!-- OneTrust Cookies Consent Notice start for goodwaygroup.com -->

<script type="text/javascript"
    src="https://cdn.cookielaw.org/consent/541c4fd0-54b8-4340-a1d2-887beeba1d51/OtAutoBlock.js"></script>

<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8"
    data-domain-script="541c4fd0-54b8-4340-a1d2-887beeba1d51"></script>

<script type="text/javascript">
    function OptanonWrapper() { }
</script>

Yup! It is the Cookie script. It seems to be modifying something and preventing our script from firing as it should.

I have recorded a quick video where I disable the script and our script loads as it should

Thank youuuu! You rock.

I’ll check in with our IT team, then mark this as solved when we are all done updating/fixing. :slight_smile:

1 Like

Absolutely! Let me know how it goes!