sentry-javascript: self._mergeOptions is not a function with Strapi v4
Environment
self-hosted (https://develop.sentry.dev/self-hosted/)
Version
- Strapi - 4.1.7
- @sentry/node - 6.19.6
- @sentry/tracing - 6.19.6
No response
Steps to Reproduce
Instrument Strapi v4 application with Sentry integration. Followed Performance monitoring setup with Koa from the doc
Expected Result
Log Strapi erros on Sentry
Actual Result
Not able to track errors on Sentry instead logs self._mergeOptions is not a function
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
Yes that’s what I was using already.
Hi, I found out that it was a problem with Strapi docker image that installs Strapi globally. There must be a mismatch with Sentry versions or something. Installing everything locally and running outside of docker it’s working fine.
Thx for your help.
Strapi version 4.11.1 upgraded to latest Sentry version. This fixed the issue. So, closing this
I’m seeing in the repository you linked that you have old Sentry dependencies in your lockfile: example
The particular version you have, has a bug that was reported in https://github.com/getsentry/sentry-javascript/issues/2622 and got fixed in https://github.com/getsentry/sentry-javascript/pull/3458.
Can you try and update those dependencies to at least version 6.3.2 and report back whether that fixed the issue? By the way, I strongly recommend using the same versions across all Sentry SDK dependencies, as having different versions might introduce unknown behaviour.
Hrm, routing this to Web FE since it seems to be a support request with using Koa vs. a self-hosted setup question.