Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#4,873 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
vite
領域
cli

調査の方向性

まず、提供された netlify-cli の設定と npm run build を使用して、GET と POST の両方のハンドラーを定義する SvelteKit エンドポイントに対する POST リクエストを再現します。結果を SvelteKit を直接実行した場合と比較します。POST リクエストが "Function not found..." ではなくエンドポイントのレスポンスを返せば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
1.9k
フォーク
478
平均マージ
2日 17時間
マージ済み PR(30日)
63

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

netlify/cli のほかの issue

netlify/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。