SvelteKit wizard creates `instrumentation.server` for adapters that do not support it

Abierto
#1,398 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start in src/sveltekit/sveltekit-wizard.ts, where the instrumentation setup is chosen from the Kit version alone. Check how the adapter is detected, if at all, and compare the adapters listed in the table against the ones that reject instrumentation.server. Reproduce by hand-writing the instrumentation file in a SvelteKit project using @sveltejs/adapter-static and running vite build. Done when the wizard skips that file for unsupported adapters and the build passes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

SvelteKit
Environment

@sentry/wizard master (b262ed0, 9.1.0 plus one commit), SvelteKit integration, @sveltejs/kit 2.70.4. Reproduced with a hand-written instrumentation file like the one the wizard creates, not a full wizard run.

Steps to Reproduce
  1. Have a SvelteKit project (Kit 2.31 or later) that uses @sveltejs/adapter-static.
  2. Run npx @sentry/wizard -i sveltekit.
  3. Run vite build.
Expected Result

The wizard only creates instrumentation.server if the adapter supports it, and the build passes.

Actual Result

The build fails:

Error: .../src/instrumentation.server.js is unsupported in @sveltejs/adapter-static.
Adapter vite build
adapter-static 3.0.11 fails
adapter-auto 6.1.1 fails ("instrumentation.server.js only works in certain environments")
adapter-node 5.5.8 passes
adapter-vercel 6.3.5 passes
adapter-netlify 5.2.4 passes
adapter-cloudflare 7.2.10 passes

adapter-auto was built locally, where it cannot determine the target. It may behave differently on a detected host.

src/sveltekit/sveltekit-wizard.ts chooses the instrumentation setup from the Kit version alone.

Lenguaje dominante
TypeScript
Estrellas
297
Forks
88
Merge medio
5 h 29 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-wizard

Todos los issues de getsentry/sentry-wizard

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.