SvelteKit (Vite) POST request resulting in "Function not found..." response message.
メンテナーはふだん 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 の本文から書いたものです。
説明
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
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
netlify/cli のほかの issue
-
netlify dev returns 403 for static files in subdirectories on Windows (backslash in rewritten path)対応中かも @Ramnath0521 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
`client-ip` is not an IP address when `x-forwarded-for` holds a list or a port対応中かも @Dev-next-gen が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
`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`)対応中かも @bsplatt92 が 52 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area: command: deploy area: docs type: feature
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
netlify/cli#1984 · コメント 19 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
CARDオープン
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
MystenLabs/MemWal#1163 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Mondriaan
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
knaw-huc/textannoviz#709 ·
メンテナーはふだん 1 日以内に返信
-
billion-context-pi
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ranxianglei/billion-context#2521 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: YRF Music Nepalオープンstreams:add
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100