Installing sentry-capacitor

Hi there, I have an ionic project with capacitor and want to use this.

  1. I cloned the repo in a local directory, src
  2. npm install src/sentry-capacitor
  3. looks good, in package.json I see “@sentry/capacitor”: “file:src/sentry-capacitor”,
  4. per the README I use: import * as Sentry from “@sentry/capacitor”;

ionic build gives me: This dependency was not found
Not sure what I’m doing wrong, seems to work fine in the example project.

We’re focusing on the Capacitor plugin in the next days.
The plan is to have it on npm with Android support at first, while we finalize the iOS support, then GA both of them on npm.

Consider following this tracking issue that will hold updates: Release GA on npm · Issue #29 · getsentry/sentry-capacitor · GitHub

And subscribing to the repo to get more data such as releases and give feedback on PRs and issues:


Any support for Capacitor and Ionic Vue? It appears the current support is Ionic Angular. Not sure how to get it up and running as-is.

Even though we don’t have necessarily docs or sample for that, and @jennmueng can correct me if I’m wrong but it should work.

You can follow the instructions here: Capacitor | Sentry Documentation

@sentry/capacitor is what matters, the Angular bits is to hook into the angular error handling bits so you can skip the Angular part.

Additionally, Sentry released a vue 3 support today:

You might want to install that package and pass the init function like we do in the Angular example but it should capture unhandled errors and native crashes, release health, etc all out of the box through @sentry/capacitor