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
Check for mismatched installed Sentry SDK packages #434
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having multiple different versions of SDK packages installed can lead to a lot of subtle and hard-to-debug issues. This can sadly happen quite easily, e.g. if you have a bundler plugin installed and then install a newer sentry SDK package, you may still have some references to the versions previously installed through the bundler plugin installed, etc. We have this issue pop up quite regularly, and right now it is very hard for either us our our users to figure out what is going on, and if that is a problem.
In order to fix this, we should add three things
npx @sentry/bundler-plugin-core@latest verify-sdk-versions
npx @sentry/bundler-plugin-core@latest fix-sdk-versions
The warning could be something like this:
These commands would need to work for npm, yarn & pnpm lockfiles. I propose to use an approach similar to https://github.com/mydea/yarn-update-dependency, where we actually read the lockfile and find all the installed versions from there. We can probably also use a similar approach to try to fix the installed versions.
The text was updated successfully, but these errors were encountered: