Error when running `yarn generate-adaptors`
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
- Đọ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 OpenFn/docs
-
Remove v1 version of docs and references to itCó thể đã có người làm @taylordowns2000 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
OpenFn/docs#905 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Write documentation for migrating workflow codeCó thể đã có người làm @PiusKariuki đã nhận 4 ngày trước. Đang mởP1
OpenFn/docs#903 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Review and update Manage User Credential pageCó thể đã có người làm @mtuchi đã nhận 11 ngày trước. Đang mở
OpenFn/docs#883 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Install prettier and run on docsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
blamechris/chroxy#8579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
modusensus/dsh-mneme#411 ·
-
Flaky (suspected): VideoTimelineEditor bed audio test sees 600px instead of 120px under CI loadĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Actions on ToastsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nextcloud-libraries/nextcloud-dialogs#2669 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
XRPLF/xrpl-dev-portal#4000 ·
Maintainer thường phản hồi trong vòng 1 ngày