-
-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS2451: Cannot redeclare block-scoped variable #249
Comments
To fix this you must use a fixed sibling version of angular and tracing
Additionally, at the moment the SDK is compatible with version 7.13.0. Hopefully this situation will get clearer on the next versions of Sentry Capacitor |
By the way, what if when updating the Sentry packages you would get a message like this
Would that be a convenient way of telling you what to do in order to update those packages? (also a similar message if you were using npm for package management) Ideally it should work out of the box, but unfortunately, it's how the SDK behaves when there's a duplicated sibling package. |
I am backlogging this for the JS SDK team because I'd like to fix this more sustainably. Right now we're polluting the global typescript namespace with the JS SDK. Here is the origin of the problem: getsentry/sentry-javascript#5155 (comment) (Note to self: What looks fishy, probably is) |
Just to let you know, fixing the versions as specified above does work - thank you @lucas-zimerman. |
Had a very similar issue. I was using |
npm install --save-exact @sentry/[email protected] --update-sentry-capacitor |
Is it only compatible with Click to expand logs
|
To fix this right now all versions of the sentry packages should be aligned. So if you're on 7.13.0 you need |
Getting same/similar build error on a Ionic 6 / Angular 16 / Capacitor 4 project. Trying to move from @sentry/angular to @sentry/angular-ivy.
|
@zarko-tg If you use |
@chutzemischt I think the problem is that support for Angular 16 comes only with 7.51.0. |
@zarko-tg zarko-tg You're right, Angular 16 support comes officially with 7.51.0. Didn't saw that. I've a project which is running with Angular 16 and following versions of sentry:
Of course the |
This is still a problem, so I opened a new case: |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
I just hit this problem, Angular 15, build was working fine last I touched this, just changed some unrelated files (outside the SPA) and CI is broken but build locally. Sentry 7.81.1
https://github.com/dotnet/nuget-trends/actions/runs/6990848438/job/19020769563?pr=245 I'm using Any tips how to resolve this? (For now I removed the feedback package) |
@bruno-garcia We can fix this upstream. I'll start working on it today! |
@lucas-zimerman @bruno-garcia We fixed this upstream in the latest JS SDK release so once we update everything this error should be gone for good. |
Thanks Luca! I'll test it on nuget trends the weekend |
The latest Capacitor already points to the JavaScript SDK with the required fix for this so I am closing this issue, if there are any questions, feel free to create a new issue. |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/angular
SDK Version
7.16.0
Framework Version
Angular 13.3.11 & Ionic 6.3.2
Link to Sentry event
No response
Steps to Reproduce
Node.js v16.10.x
Typescript 4.5.x
Currently we are using the following versions of Sentry package:
"@sentry/angular": "^6.19.7",
"@sentry/capacitor": "^0.6.1",
"@sentry/tracing": "^6.19.7"
After trying to bump all packages to latest i.e.:
"@sentry/angular": "^7.16.0",
"@sentry/capacitor": "^0.10.1",
"@sentry/tracing": "^7.16.0"
Expected Result
No error
Actual Result
I receive the following error:
The text was updated successfully, but these errors were encountered: