Improve changed-file verifier diagnostics when dependencies are missing

Đang mở
#8,050 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
hugo, javascript, node.js
Lĩnh vực
tooling

Hướng nghiên cứu

Start with the documented setup, package.json, yarn.lock, and the changed-file verifier and scripts/ci/lint-codeblocks.mjs; confirm the supported Node and Yarn versions and install the repository dependencies. Then rerun yarn verify:changed -- --run content/platform/_index.md and check whether the missing p-limit error is resolved. If setup resolves it, make the verifier or documentation explain how to prepare dependencies; if not, identify the underlying cause and add a regression check that preserves reporting of real lint failures.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

The changed-file verifier attempts to run code-block lint even when the checkout's JavaScript dependencies aren't installed. The lint command then fails with a Node module-resolution stack trace instead of explaining how to prepare the environment.

Observed

In a checkout with an empty node_modules directory, run:

yarn verify:changed -- --run content/platform/_index.md

The verifier reports a failed yarn lint-codeblocks command. The underlying error is:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'p-limit' imported from .../scripts/ci/lint-codeblocks.mjs

p-limit is already declared in package.json and recorded in yarn.lock. This observation does not establish a missing dependency declaration or a CI failure. The checkout had an empty node_modules; installing the repo's dependencies may resolve this specific failure. The affected check hasn't been rerun after an install.

Requested work

  • Reproduce from a fresh checkout using the documented setup. Confirm the supported Node and Yarn versions and whether installing dependencies resolves the error.
  • If the normal setup resolves it, make the verifier or documentation give a clear, actionable dependency-install instruction when the environment isn't prepared.
  • If the failure persists after the supported installation, identify and fix the actual dependency or environment problem.
  • Add an appropriate regression check for any behavior changed, and confirm the verifier still reports real lint failures.

Context

Found while checking the InfluxDB 1 positioning changes. The same checkout also lacked the local Hugo executable, so the full build wasn't verified there.

Ngôn ngữ chính
JavaScript
Star
83
Fork
334
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
106

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của influxdata/docs-v2

Tất cả issue của influxdata/docs-v2

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.