Title: What is the correct way to install Sentry on Nuxt? 😥 · Issue #14732 · getsentry/sentry-javascript · GitHub
Open Graph Title: What is the correct way to install Sentry on Nuxt? 😥 · Issue #14732 · getsentry/sentry-javascript
X Title: What is the correct way to install Sentry on Nuxt? 😥 · Issue #14732 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/14732
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"What is the correct way to install Sentry on Nuxt? 😥","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSelf-hosted/on-premise\n\n### Which SDK are you using?\n\n@sentry/nuxt\n\n### SDK Version\n\n8.45.0\n\n### Framework Version\n\n3.14.159\n\n### Link to Sentry event\n\n_No response_\n\n### Reproduction Example/SDK Setup\n\n```\nSentry.init({\n dsn: import.meta.env.APP_SENTRY_INIT_DSN,\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration(),\n Sentry.browserProfilingIntegration(),\n Sentry.captureConsoleIntegration({\n levels: ['error', 'warn'],\n }),\n Sentry.dedupeIntegration(),\n Sentry.httpClientIntegration({\n failedRequestStatusCodes: [400, 401, 403, 404, 405, 429, 444],\n }),\n ],\n sendDefaultPii: true,\n tracesSampleRate: 1.0,\n tracePropagationTargets: ['localhost'],\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n profilesSampleRate: 1.0,\n })\n```\n\n### Steps to Reproduce\n\nI have followed the steps from the existing instructions:\n1. https://nuxt.com/modules/sentry\n2. https://docs.sentry.io/platforms/javascript/guides/nuxt/manual-setup/\n\nSteps:\n1. Install the Sentry Nuxt SDK:\n```\n# Using npm\nnpm install @sentry/nuxt\n```\n\n2. Add @sentry/nuxt/module to the modules section of nuxt.config.ts\n```\n// nuxt.config.ts\nexport default defineNuxtConfig({\n modules: ['@sentry/nuxt/module'],\n});\n```\n\n3. Add a sentry.client.config.ts file to the root of your project:\n```\nimport * as Sentry from '@sentry/nuxt'\nimport { useRuntimeConfig } from '#imports'\n\nSentry.init({\n dsn: useRuntimeConfig().public.sentry.dsn,\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration(),\n Sentry.browserProfilingIntegration(),\n Sentry.captureConsoleIntegration({\n levels: ['error', 'warn'],\n }),\n Sentry.dedupeIntegration(),\n Sentry.httpClientIntegration({\n failedRequestStatusCodes: [400, 401, 403, 404, 405, 429, 444],\n }),\n ],\n sendDefaultPii: true,\n tracesSampleRate: 1.0,\n tracePropagationTargets: ['localhost'],\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n profilesSampleRate: 1.0,\n})\n```\n\n4. Add a sentry.server.config.ts file to the root of your project:\n```\nimport * as Sentry from '@sentry/nuxt'\n\nif (process.env.APP_SENTRY_INIT_DSN) {\n Sentry.init({\n dsn: import.meta.env.APP_SENTRY_INIT_DSN,\n integrations: [\n Sentry.browserTracingIntegration(),\n Sentry.replayIntegration(),\n Sentry.browserProfilingIntegration(),\n Sentry.captureConsoleIntegration({\n levels: ['error', 'warn'],\n }),\n Sentry.dedupeIntegration(),\n Sentry.httpClientIntegration({\n failedRequestStatusCodes: [400, 401, 403, 404, 405, 429, 444],\n }),\n ],\n sendDefaultPii: true,\n tracesSampleRate: 1.0,\n tracePropagationTargets: ['localhost'],\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n profilesSampleRate: 1.0,\n })\n}\n```\n\n5\n```\n\"overrides\": {\n \"@vercel/nft\": \"^0.27.4\"\n}\n```\n\n6. Add the command to package.json:\n```\n\"start\": \"node --import ./.output/server/sentry.server.config.mjs .output/server/index.mjs\",\n```\n\n\n### Expected Result\n\nI expect everything to work right out of the box.\nHelp me, please!\n\n### Actual Result\n\nI get the following typing errors in the files (sentry.client.config.ts and sentry.server.config.ts):\n\n\n- The ‘init’ property does not exist in the ‘typeof import(’project-name/node_modules/@sentry/nuxt/build/types/index.types‘)’ type.\n- The ‘browserTracingIntegration’ property does not exist in the ‘typeof import(’project-name/node_modules/@sentry/nuxt/build/types/index.types‘)’ type.\n- etc\n\nWhen I go to import, I get:\n\n","author":{"url":"https://github.com/svk-man","@type":"Person","name":"svk-man"},"datePublished":"2024-12-16T14:06:25Z","url":"https://github.com/getsentry/sentry-javascript/issues/14732"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:41a493cb-97f7-4108-d824-45616bab5dfc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC5A:3A6B0F:2C5B7D:3F2BC7:6B040C73 |
| html-safe-nonce | 44f7e9ee0acd5023f0adefc4bf6eb6fb533906a3ce8fc935a5378ff4c6aa6557 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzVBOjNBNkIwRjoyQzVCN0Q6M0YyQkM3OjZCMDQwQzczIiwidmlzaXRvcl9pZCI6Ijc0NTQ4NzA3NDI4NjY1OTQ5MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2685cb981e3d3afe4cac5f97226acdd9e89639b8b08758e7839d3d8cf86919f1 |
| hovercard-subject-tag | issue:2742488347 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/14732/issue_layout |
| twitter:image | https://opengraph.githubassets.com/436e3e47e2612b262bccc770f2933e9e3120dbbfea963be20bf3f9a149bd126d/getsentry/sentry-javascript/issues/14732 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/436e3e47e2612b262bccc770f2933e9e3120dbbfea963be20bf3f9a149bd126d/getsentry/sentry-javascript/issues/14732 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | svk-man |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width