Skip to content
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

TypeError: utils_1.Dsn is not a constructor #2392

Closed
4 of 9 tasks
fhollste opened this issue Jan 24, 2020 · 1 comment
Closed
4 of 9 tasks

TypeError: utils_1.Dsn is not a constructor #2392

fhollste opened this issue Jan 24, 2020 · 1 comment

Comments

@fhollste
Copy link

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

5.11.1

Description

I updated the SDK from 5.7.0 to 5.11.1 and now I get this error caused by Senty.init()

node_modules/@sentry/core/dist/api.js:9
        this._dsnObject = new utils_1.Dsn(dsn);
                          ^

TypeError: utils_1.Dsn is not a constructor
    at new API (node_modules/@sentry/core/dist/api.js:9:27)
    at HTTPSTransport.BaseTransport (node_modules/@sentry/node/dist/transports/base.js:17:21)
    at new HTTPSTransport (node_modules/@sentry/node/dist/transports/https.js:11:28)
    at NodeBackend._setupTransport (node_modules/@sentry/node/dist/backend.js:33:16)
    at NodeBackend.BaseBackend (node_modules/@sentry/core/dist/basebackend.js:15:32)
    at new NodeBackend (node_modules/@sentry/node/dist/backend.js:15:42)
    at NodeClient.BaseClient (node_modules/@sentry/core/dist/baseclient.js:49:25)
    at new NodeClient (node_modules/@sentry/node/dist/client.js:19:23)
    at Object.initAndBind (node_modules/@sentry/core/dist/sdk.js:15:38)
    at Object.init (node_modules/@sentry/node/dist/sdk.js:102:12)
...

Setup copied directly from docs:

const Sentry = require('@sentry/node');
Sentry.init({ dsn: 'https://xxx@sentry.io/xxx' });
@kamilogorek
Copy link
Contributor

If you simply updated the packages, remove all node_modules and reinstall them again. npm has a strange tendency to incorrectly resolve updated packages and they are getting out of sync ¯_(ツ)_/¯

See:
#2378
#2335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants