Skip to content

ERROR RollupError: [plugin impound] Importing directly from module entry-points is not allowed. [importing @sentry/nuxt from sentry.server.config.ts]Β #14333

@larsvdd

Description

@larsvdd

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.38.0

Framework Version

Nuxt 3.14.159

Link to Sentry event

No response

Reproduction Example/SDK Setup

sentry.server.config.ts

import * as Sentry from "@sentry/nuxt";

if (process.env.SENTRY_DSN) {
	Sentry.init({
		dsn: process.env.SENTRY_DSN,
		// Tracing
		// We recommend adjusting this value in production, or using a tracesSampler for finer control.
		tracesSampleRate: 1.0, // Capture 100% of the transactions
	});
}

sentry.client.config.ts

import { useRuntimeConfig } from "#imports";
import * as Sentry from "@sentry/nuxt";

Sentry.init({
	dsn: useRuntimeConfig().public.sentry.dsn,
	integrations: [Sentry.replayIntegration()],
	tracesSampleRate: 1.0,
	replaysSessionSampleRate: 0.1,
	replaysOnErrorSampleRate: 1.0,
});

modules in nuxt.config.ts

modules: [
		"@sentry/nuxt/module",
	],
sentry: {
		dsn: process.env.SENTRY_DSN,
		sourcemap: {
			client: true,
			server: true,
		},
		sourceMapsUploadOptions: {
			org: "dutch-beauty-group",
			project: "vue-storefront",
			authToken: process.env.SENTRY_AUTH_TOKEN,
		},
	},

Steps to Reproduce

I followed the installation steps but I get a:
[nitro] ERROR RollupError: [plugin impound] Importing directly from module entry-points is not allowed. [importing @sentry/nuxt from sentry.server.config.ts]

And client side:
[plugin:vite:import-analysis] Importing directly from module entry-points is not allowed. [importing @sentry/nuxtfromsentry.client.config.ts]

Expected Result

A working environment with Sentry installed πŸ˜…

Actual Result

Nuxt not starting...

Image

Metadata

Metadata

Assignees

No one assigned

    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