From 59d7e25687a0f7c0fc632fd0c4baed64362f7824 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 22 Oct 2024 10:52:00 +0200 Subject: [PATCH 1/2] docs(nuxt): Add "Troubleshoot Server-Side" --- .../javascript.nuxt.mdx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/platform-includes/getting-started-config/javascript.nuxt.mdx b/platform-includes/getting-started-config/javascript.nuxt.mdx index 1adacfbb3cf7ac..e4a1c1f864d563 100644 --- a/platform-includes/getting-started-config/javascript.nuxt.mdx +++ b/platform-includes/getting-started-config/javascript.nuxt.mdx @@ -69,8 +69,33 @@ dotenv.config(); // ... rest of the file ``` +#### Troubleshoot Server-Side In the beta state of the Nuxt SDK, some features may not work with certain deployment providers. Check the progress on GitHub: [Compatibility with different Deployment Platforms](https://github.com/getsentry/sentry-javascript/issues/14029) +When adding `sentry.server.config.ts`, you might get an error like this: +`Failed to register ESM hook import-in-the-middle/hook.mjs`. You can add an override (npm/pnpm) or a resolution (yarn) +for `@vercel/nft` to fix this. This will add the `hook.mjs` file to your build output +([Nitro issue here](https://github.com/unjs/nitro/issues/2703)). + +```json {tabTitle:npm} {filename:package.json} +"overrides": { + "@vercel/nft": "^0.27.4" +} +``` + +```json {tabTitle:yarn} {filename:package.json} +"resolutions": { + "@vercel/nft": "^0.27.4" +} +``` + +```json {tabTitle:pnpm} {filename:package.json} +"pnpm": { + "overrides": { + "@vercel/nft": "^0.27.4" + } +} +``` From 3f8abe50ce5e7091833a08b59b8265696c09c397 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 22 Oct 2024 11:09:14 +0200 Subject: [PATCH 2/2] review comments --- .../getting-started-config/javascript.nuxt.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform-includes/getting-started-config/javascript.nuxt.mdx b/platform-includes/getting-started-config/javascript.nuxt.mdx index e4a1c1f864d563..76571506139dfe 100644 --- a/platform-includes/getting-started-config/javascript.nuxt.mdx +++ b/platform-includes/getting-started-config/javascript.nuxt.mdx @@ -69,16 +69,16 @@ dotenv.config(); // ... rest of the file ``` -#### Troubleshoot Server-Side - In the beta state of the Nuxt SDK, some features may not work with certain deployment providers. Check the progress on GitHub: [Compatibility with different Deployment Platforms](https://github.com/getsentry/sentry-javascript/issues/14029) -When adding `sentry.server.config.ts`, you might get an error like this: +#### Troubleshoot Errors during Server Startup + +After adding `sentry.server.config.ts` and building the project, you might get an error like this: `Failed to register ESM hook import-in-the-middle/hook.mjs`. You can add an override (npm/pnpm) or a resolution (yarn) -for `@vercel/nft` to fix this. This will add the `hook.mjs` file to your build output -([Nitro issue here](https://github.com/unjs/nitro/issues/2703)). +for `@vercel/nft` to fix this. This will add the `hook.mjs` file to your build output. +See the [underlying issue in the UnJS Nitro project](https://github.com/unjs/nitro/issues/2703). ```json {tabTitle:npm} {filename:package.json} "overrides": {