SvelteKit (Vite) POST request resulting in "Function not found..." response message.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- vite
- Área
- cli
Línea de trabajo
Comienza reproduciendo la solicitud POST contra un endpoint de SvelteKit que define manejadores GET y POST, utilizando la configuración proporcionada de netlify-cli y npm run build. Compara el resultado con la ejecución directa de SvelteKit; se considera hecho cuando la solicitud POST devuelve la respuesta del endpoint en lugar de "Function not found...".
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
UPDATED: After the original issue disappeared with a netlify update, the issue recently reappeared. See the comments below for details. I have provided a minimal recreation in the comments.
Describe the bug
I am using SvelteKit in my project. My site seems to work well for all GET requests including those that leverage endpoints. However, I have one endpoint that has handlers for both GET and POST requests. The GET request works fine, however when I submit a POST request to that same endpoint, I get the text response message "Function not found...".
This is not a problem I run into when running SvelteKit directly instead of through netlify-cli.
I verified that the corresponding .netlify/server/entries/endpoints file has both GET and POST functions.
Any suggestions for things to try? If this is a head-scratcher, I'll move forward with creating a test project that reproduces the issue.
Steps to reproduce
Submit a POST request to an enpoint that defines both GET and POST handlers.
Configuration
[build]
command = "npm run build"
publish = "dist"
[dev]
command = "npm run dev -- --host"
targetPort = 5173
port = 9090
autoLaunch = false
functionsPort = 9091
Environment
System:
OS: Linux 5.15 KDE neon 5.25
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
Memory: 9.52 GB / 15.35 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 17.6.0 - ~/apps/nodejs/node-current/bin/node
Yarn: 1.22.17 - ~/apps/nodejs/node-current/bin/yarn
npm: 8.5.2 - ~/apps/nodejs/node-current/bin/npm
npmGlobalPackages:
netlify-cli: 10.5.1
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.9k
- Forks
- 478
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 37
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de netlify/cli
-
netlify dev returns 403 for static files in subdirectories on Windows (backslash in rewritten path)Posiblemente ocupada @Ramnath0521 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
`client-ip` is not an IP address when `x-forwarded-for` holds a list or a portPosiblemente ocupada @Dev-next-gen la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
`netlify dev` with `--cwd` from outside the project: every function 500s with "module is not defined in ES module scope" (`detectZisiBuilder` passes a string to `readPackageUp`)Posiblemente ocupada @bsplatt92 la tomó hace 52 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area: command: deploy area: docs type: feature
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
netlify/cli#1984 · 19 comentarios · 3 reacciones ·
Los mantenedores suelen responder en 1 día
-
type: bug
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
Los mantenedores suelen responder en 1 día
Todos los issues de netlify/cli
Issues similares
-
First unknown-user login after boot is one scrypt run slower than a real user's wrong passwordAbiertoarea: backend bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
snapotter-hq/SnapOtter#2254 ·
Los mantenedores suelen responder en 1 día
-
bug ticket
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cratestack/cratestack#1154 ·
Los mantenedores suelen responder en 1 día
-
server 消息处理器 cmd 分支补显式错误回报——竞态非法命令现走未处理拒绝Posiblemente ocupada @openaddr la tomó hoy. Abiertoready-for-agent refactor wayfinder:task
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openaddr/dafung-web#428 ·
Los mantenedores suelen responder en 1 día
-
Flaky: mongodb-memory-server 'Port already in use' when another process starts a mongod concurrentlyAbiertoarea:testing bug effort:S priority:P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
lens:agent lens:process process
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
thebristolsound/birdbrain#1772 ·
Los mantenedores suelen responder en 1 día