Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Error when running `yarn generate-adaptors`

Đang mở
#682 2 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu bằng cách chạy yarn generate-adaptors và kiểm tra sidebars-adaptors.js quanh các dòng 89-91. Truy tìm bản ghi tổng quan nào tạo ra id rỗng và xác định nguyên nhân nằm ở dữ liệu nguồn hay ở quá trình tạo sidebar. Hoàn tất khi nguyên nhân gốc đã được xử lý và lệnh hoàn thành mà không gặp lỗi xác thực sidebar của Docusaurus.

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

Mô tả

Description
I was getting the error below 👇🏽, when running yarn generate-adaptors.

ERROR] Sidebars file at "/Users/openfn/Workspace/docs/sidebars-adaptors.js" failed to be loaded.
[ERROR] Loading of version failed for version current

[ERROR] Error [ValidationError]: {
  "type": "doc",
  "label": "",
  "translatable": true,
  "id" [1]: ""
}

[1] "id" is not allowed to be empty
    at exports.process (/Users/openfn/Workspace/docs/node_modules/joi/lib/errors.js:193:16)
    at internals.entry (/Users/openfn/Workspace/docs/node_modules/joi/lib/validator.js:250:26)
    at exports.entry (/Users/openfn/Workspace/docs/node_modules/joi/lib/validator.js:27:30)
    at internals.Base.validate (/Users/openfn/Workspace/docs/node_modules/joi/lib/base.js:548:26)
    at internals.assert (/Users/openfn/Workspace/docs/node_modules/joi/lib/index.js:225:27)
    at Object.assert (/Users/openfn/Workspace/docs/node_modules/joi/lib/index.js:102:19)
    at validateSidebarItem (/Users/openfn/Workspace/docs/node_modules/@docusaurus/plugin-content-docs/lib/sidebars/validation.js:124:28)
    at Array.forEach (<anonymous>)
    at /Users/openfn/Workspace/docs/node_modules/@docusaurus/plugin-content-docs/lib/sidebars/validation.js:131:17
    at Array.forEach (<anonymous>) {
  _original: { type: 'doc', id: '', label: '', translatable: true },
  details: [
    {
      message: '"id" is not allowed to be empty',
      path: [ 'id' ],
      type: 'string.empty',
      context: { label: 'id', value: '', key: 'id' }
    }
  ]
}

I traced the root cause of the error to https://github.com/OpenFn/docs/blob/main/sidebars-adaptors.js#L89-L91

  const extras = overviews
    .filter(id => !adaptors.map(a => `${a.name}`).includes(id))
    .map(id => ({ type: 'doc', id, label: id }));

which was happening because id was '' for one of the record. I fixed it by checking if id && !adaptors.map(a => ${a.name}).includes(id) But i am not sure if this is the proper fix because we need to know why the id value is ''

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

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

  • Không có Dockerfile hay 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 OpenFn/docs

Tất cả issue của OpenFn/docs

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.