Skip to content

[Nuxt] Error with autoImport disabled #13302

@darthf1

Description

@darthf1

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

8.25.0

Framework Version

3.12.4

Link to Sentry event

No response

Reproduction Example/SDK Setup

When auto-import is disabled, an error is thrown

Steps to Reproduce

Create Nuxt project with autoImport disabled:

nuxt.config.ts

import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  imports: {
    autoImport: false,
  },

  sentry: {
    debug: import.meta.env.DEV,
    sourceMapsUploadOptions: {
      authToken: process.env.NUXT_PUBLIC_SENTRY_AUTH_TOKEN,
      org: process.env.NUXT_PUBLIC_SENTRY_ORG,
      project: process.env.NUXT_PUBLIC_SENTRY_PROJECT,
      telemetry: false,
    },
  },
})

Expected Result

A world of happiness

Actual Result

Uncaught ReferenceError: defineNuxtPlugin is not defined

Image

Image

Metadata

Metadata

Assignees

Labels

BugPackage: nuxtIssues related to the Sentry Nuxt SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions