Skip to content

import Sentry from '@sentry/node'; // undefined #1723

@dlepaux

Description

@dlepaux

Package + Version

  • @sentry/node

Version:

4.3.0

Description

A simple import of Sentry return nothing :

import Sentry from '@sentry/node';
console.log(Sentry); // undefined

However the const Sentry = require('@sentry/node'); works fine !

[EDIT]
You need to use this syntax to import properly Sentry.

import * as Sentry from '@sentry/node';

I think it could be interesting to regroup all in one object and return it...

Here my PR to update README #1724

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions