Skip to content

Uncaught ReferenceError: require is not defined with Vue 3 #3091

Description

@karanagarwal17

Package + Version

  • @sentry/browser
  • @sentry/integrations
  • @sentry/tracing

Version:

5.28.0

Description

When doing one of the following:

import * as Sentry from '@sentry/browser'
import { Vue as VueIntegration } from '@sentry/integrations'
import { Integrations } from '@sentry/tracing'

I will get the following error in the browser:

Uncaught ReferenceError: require is not defined
    <anonymous> http://localhost:3000/@modules/@sentry/integrations.js:650

<anonymous> http://localhost:3000/@modules/@sentry/integrations.js:650
    InnerModuleEvaluation self-hosted:2346
    InnerModuleEvaluation self-hosted:2346
    evaluation self-hosted:2317

I believe this is due to using require on line 650 var localForage = require('localforage'); while the rest of the places are using import/export.

Is there something I am doing wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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