Skip to content

Cannot resolve dependency 'perf_hooks' in @sentry/serverless #2942

Closed
@martsie

Description

@martsie

Package + Version

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

Version:

5.25.0

Description

It appears that the bug referenced in #2523 and #2522 and fixed in #2495 was not fixed for the @sentry/serverless library.

/node_modules/@sentry/serverless/esm/awslambda.js:4:28: Cannot resolve dependency 'perf_hooks'
  2 | import { addExceptionMechanism } from '@sentry/utils';
  3 | import { hostname } from 'os';
> 4 | import { performance } from 'perf_hooks';
    |                            ^
  5 | import { types } from 'util';
  6 | const { isPromise } = types;
  7 | /**
error Command failed with exit code 1.

Tried upgrading to 525.0 beta versions and downgrading to 5.23.0 and the same error exists on build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions