Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

SvelteKit (Vite) POST request resulting in "Function not found..." response message.

Aperta
#4,873 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
vite
Ambito
cli

Direzione di ricerca

Inizia riproducendo la richiesta POST verso un endpoint SvelteKit che definisce handler GET e POST, utilizzando la configurazione netlify-cli fornita e npm run build. Confronta il risultato con l'esecuzione diretta di SvelteKit; l'attività è completata quando la richiesta POST restituisce la risposta dell'endpoint invece di "Function not found...".

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: frameworks area: functions more info needed type: bug

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
Lingua principale
TypeScript
Stelle
1.9k
Fork
480
Merge medio
1g 9h
PR unite (30g)
58

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di netlify/cli

Tutte le issue di netlify/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.