Skip to content

vitest/browser + nuxt | Failed to resolve entry for package "@sentry/nuxt" #18070

Description

@OrbisK

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

10.22.0

Framework Version

Nuxt: 4.1.3

Link to Sentry event

No response

Reproduction Example/SDK Setup

import * as Sentry from '@sentry/nuxt'

Sentry.init({
  enabled: false,
})

Steps to Reproduce

  1. clone https://github.com/OrbisK/test-utils-fork/tree/reproduction-sentry-nuxt
  2. switch to branch reproduction-sentry-nuxt
  3. pnpm i
  4. cd examples/app-vitest-browser
  5. pnpm test

Expected Result

No internal server error

Actual Result

3:29:10 PM [vite] Internal server error: Failed to resolve entry for package "@sentry/nuxt". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@sentry/nuxt" package
  Plugin: vite:import-analysis
  File: examples/app-vitest-browser/sentry.client.config.ts:1:24
  1  |  import * as Sentry from "@sentry/nuxt";
     |                           ^
  2  |  Sentry.init({
  3  |    // If set up, you can use your runtime config here

Additional Context

maybe related to #16120

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions