-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Sentry Angular 8: Can't use without @angular/router #12524
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
Comments
Hey @hheexx thanks for writing in. You're right that the SDK only seems to support Angular router atm. For now can you use a build plugin (vite or webpack) to alias the export to I'm backlogging this for the team, but PRs are welcome if you would like to help fix this. Thanks! |
Hi @hheexx, is this still an issue for you? Another thing you could try is not to use the |
Is there an existing issue for this?
How do you use Sentry?
Self-hosted/on-premise
Which SDK are you using?
@sentry/angular
SDK Version
8.9.2
Framework Version
Angular 18
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
Sentry can't be used without angular router.
We have a project that uses alternative router.
As soon as I import * as Sentry from "@sentry/angular";
I get error:
X [ERROR] Could not resolve "@angular/router"
You can mark the path "@angular/router" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
X [ERROR] TS2307: Cannot find module '@angular/router' or its corresponding type declarations. [plugin angular-compiler]
X [ERROR] TS2307: Cannot find module '@angular/router' or its corresponding type declarations. [plugin angular-compiler]
Expected Result
work
Actual Result
!work
The text was updated successfully, but these errors were encountered: