Bugsnag-js: BrowserStack IE error SCRIPT1002: Syntax Error

Created on 12 Jun 2019  Â·  5Comments  Â·  Source: bugsnag/bugsnag-js

Hey all,

We've been using:

    "@bugsnag/js": "^6.0.0",
    "@bugsnag/plugin-angular": "^6.0.0",

for about two months now - and recently we ran into the SCRIPT1002: Syntax Error while testing IE11 in browserstack. Our build that had been in production was running fine with no changes, but our local instances were all running into this issue. We tracked it down to the recently released 6.3.0 version of this bugsnag library. Once we removed the ^ from the version and explicitly used version 6.0.0 it worked fine, as does 6.2.0.

This is all I really have to provide for screenshots, the error and where the error pointed to:
image
image

This could potentially be related to #550 ?

bug released

Most helpful comment

Ok – that suggests the TypeScript compiler is not transforming this module at all, perhaps due to it already being JS.

The switch fixed a different bug for users who were targetting ES6. We'll investigate and see what we can do to solve both problems.

All 5 comments

It looks like it's complaining about the native classes – we switched to using ES6 classes in v6.3.0 (in the Angular plugin only).

What is target set to in your tsconfig.json? If you want to support IE11 I think that'll need to be set to "es5" – can you confirm that it is?

@bengourley I can confirm it is currently set to "target": "es5"

Ok – that suggests the TypeScript compiler is not transforming this module at all, perhaps due to it already being JS.

The switch fixed a different bug for users who were targetting ES6. We'll investigate and see what we can do to solve both problems.

Please try the prerelease as outlined in https://github.com/bugsnag/bugsnag-js/pull/565#issuecomment-505429174 and confirm whether this solves the issue. Thanks!

This is fixed as of v6.3.2 (https://github.com/bugsnag/bugsnag-js/releases/tag/v6.3.2)

Was this page helpful?
0 / 5 - 0 ratings