`netlify dev` errors and hangs for large number of files
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- node.js, shell, typescript
- 領域
- cli, performance
調査の方向性
まず、示されている Netlify 設定を使用して、_site/ 内の報告された 302,005 個のファイルで netlify dev を再現します。netlify dev プロセスと、その繰り返し起動される npm サブシェルを追跡し、その後、繰り返しエラーが発生せず、ゾンビプロセスも蓄積されることなくサーバーが応答することを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I have a large site with lots of files.
➜ find _site/ -type f | wc -l
302005
When running netlify dev I get the following error message printed many times over continuously in the terminal.
› Error: Netlify CLI has terminated unexpectedly
This is a problem with the Netlify CLI, not with your application.
If you recently updated the CLI, consider reverting to an older version by running:
npm install -g netlify-cli@VERSION
You can use any version from https://ntl.fyi/cli-versions.
Please report this problem at https://ntl.fyi/cli-error including the error details below.
While it says "including the error details below", there are no other error details printed.
The CPU is pegged at 100% and the server does not respond to HTTP requests. The Netlify CLI seems to be continuously starting subshells which are not waited on, creating many zombie processes. There are thousands of these started within a few seconds of running netlify dev.
➜ ps -ef
...
ian 2970231 2952121 0 07:23 pts/2 00:00:00 [sh] <defunct>
ian 2970233 2952121 0 07:23 pts/2 00:00:00 [sh] <defunct>
ian 2970244 2952121 0 07:23 pts/2 00:00:00 [sh] <defunct>
ian 2970246 2952121 0 07:23 pts/2 00:00:00 [sh] <defunct>
...
I notice subshells running npm in the output of ps from the same parent process.
ian 3006104 2952121 0 07:25 pts/2 00:00:00 /bin/sh -c npm -v
ian 3006017 2952121 0 07:25 pts/2 00:00:00 /bin/sh -c npm get prefix --global
The cli does not respond to Ctrl-C and I need to kill it with SIGKILL.
If I remove most of the files from the _site directory, the errors go away and the remainder of the files are served normally.
Steps to reproduce
- Run
netlify dev
Configuration
[build]
base = "."
publish = "_site/" # relative to `base` directory
command = "make fx-build"
# NOTE: This should match the Python version in `.python-version`.
environment = { PYTHON_VERSION = "3.13.5" }
[context.deploy-preview]
# Skip deploy previews for Renovate PRs (branches starting with "renovate/")
ignore = "sh -c '[ \"${HEAD#renovate/}\" != \"$HEAD\" ]'"
[[headers]]
for = "/v1/*"
[headers.values]
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
access-control-allow-origin = "*"
Environment
➜ npx envinfo --system --binaries --npmPackages netlify-cli --npmGlobalPackages netlify-cli
System:
OS: Linux 5.15 Ubuntu 22.04 LTS 22.04 (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 14.01 GB / 15.51 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 22.21.1 - /home/ian/.local/share/nodenv/versions/22.21.1/bin/node
npm: 10.9.4 - /home/ian/.local/share/nodenv/versions/22.21.1/bin/npm
npmPackages:
netlify-cli: 23.13.0 => 23.13.0
- 主要言語
- TypeScript
- スター
- 1.9k
- フォーク
- 480
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 70
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
netlify/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
db-status.test fails if the database is disabled対応中かも @paulleephp が 3 日前に担当しました。 オープンtype: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
`client-ip` is not an IP address when `x-forwarded-for` holds a list or a port対応中かも @Dev-next-gen が 24 日前に担当しました。 オープン
難易度 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 が 65 日前に担当しました。 オープン
難易度 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 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
paperclipai/paperclip#17151 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
AgoraIO-Extensions/agent-infra#3159 ·
メンテナーはふだん 1 日以内に返信
-
blocklist addition
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
MetaMask/eth-phishing-detect#304596 ·
メンテナーはふだん 1 日以内に返信
-
friction
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
kentcdodds/kody#4142 ·
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLite対応中かも @NdekoCode が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ever-co/ever-gauzy#11214 ·
メンテナーはふだん 1 日以内に返信