<!-- Requirements: please go through this checklist before opening a new issue --> - [ ] Review the documentation: https://docs.sentry.io/ - [ ] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues - [ ] Use the latest release: https://github.com/getsentry/sentry-javascript/releases - [ ] Provide a link to the affected event from your Sentry account ## Package + Version - [ ] `@sentry/browser` - [x] `@sentry/node` - [ ] `raven-js` - [ ] `raven-node` _(raven for node)_ - [ ] other: ### Version: ``` 5.21.1 ``` ## Description Overriding `Sentry.init` results in `TypeError: Cannot set property init of #<Object> which has only a getter`. With the typescript upgrade to v3.9.7 in [v5.21.1](https://github.com/getsentry/sentry-javascript/commit/5303688ea735bc63aba215a0ed6bbca4f1f209ec#diff-5ffc88ad95286edb615a544661586990L41), the init export has changed unexpectedly. It changed from - `var sdk_1 = require("./sdk"); exports.init = sdk_1.init;` to - `Object.defineProperty(exports, "init", { enumerable: true, get: function () { return sdk_1.init; } });` Previously, one could use the following to override Sentry.init which does not work anymore - `const Sentry = require('@sentry/node'); Sentry.init = (options) => { init({ dsn: ... ...options }); Sentry.init() `