`netlify dev` errors and hangs for large number of files
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js, shell, typescript
- Lĩnh vực
- cli, performance
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện netlify dev với 302,005 tệp được báo cáo trong _site/, sử dụng cấu hình Netlify đã cho. Theo dõi tiến trình netlify dev và các subshell npm lặp đi lặp lại của nó, sau đó xác minh rằng máy chủ phản hồi mà không xuất hiện các lỗi lặp lại hoặc các tiến trình zombie tích tụ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1.9k
- Fork
- 481
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 70
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của netlify/cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
netlify/cli#8645 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
db-status.test fails if the database is disabledCó thể đã có người làm @paulleephp đã nhận 5 ngày trước. Đang mởtype: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`client-ip` is not an IP address when `x-forwarded-for` holds a list or a portCó thể đã có người làm @Dev-next-gen đã nhận 26 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`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`)Có thể đã có người làm @bsplatt92 đã nhận 67 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: command: deploy area: docs type: feature
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
netlify/cli#1984 · 19 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug hacktoberfest help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
libredb/libredb-studio#1941 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore other
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alastair-smith/card-games#308 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
paperclipai/paperclip#17379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[good first issue, hacktoberfest] 🏯 Hacktoberfest Task - Add new Anime Quote 626 (good-first-issue)Đang mởcommunity first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
lingdojo/kana-dojo#33040 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug mobile ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày