gabrielcsapo / gabrielcsapo/node-git-server

TypeError: next is not a function

Đang mở
#91 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
262
Fork
81
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

When I run the authentication sample code from the [documentation](https://gabrielcsapo.github.io/node-git-server/code/index.html) and then try to clone an existing repository, I get the following error. I've changed nothing about the sample code other than the directory and the port number, so I'd assume this is an issue with the source code.

> server.js:13
> next();
> ^
>
> TypeError: next is not a function
> at Git.authenticate (server.js:13:9)
> at Git.res.statusCode (node_modules/node-git-server/lib/git.js:307:38)
> at next (node_modules/node-git-server/lib/git.js:425:32)
> at Git.handle (node_modules/node-git-server/lib/git.js:427:9)
> at Server. (node_modules/node-git-server/lib/git.js:450:16)
> at Server.emit (node:events:390:28)
> at parserOnIncoming (node:_http_server:951:12)
> at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
>
> Node.js v17.2.0

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu với mẫu xác thực trong tài liệu được liên kết và so sánh cách sử dụng callback của mẫu này với node_modules/node-git-server/lib/git.js tại các dòng được báo cáo 307, 425-450. Tái hiện thao tác clone trên Node.js 17.2.0 và truy vết lý do next không phải là một hàm; hoàn tất khi repository hiện có được clone mà không gặp TypeError này.

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

Đánh giá

Công nghệ
git, node.js, typescript
Lĩnh vực
authentication, backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.