In an extension, Loopback CLI depends on @loopback/core in list of dependencies

Đang mở
#9,476 1 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
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
nodejs, typescript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu từ điểm vào CLI lb4 model và lần theo bước kiểm tra dependency báo cáo package @loopback/core bị thiếu. Tái hiện lệnh trong một extension của LoopBack, trong đó @loopback/core là một peerDependency; hoàn tất khi lệnh được chấp nhận mà không yêu cầu package này trong dependencies.

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

Mô tả

bug
Describe the bug

Running CLI commands such as lb4 model in a loopback extension cause the commands to be aborted.

Generation is aborted: Error: No `@loopback/core` package found in the "dependencies" section of C:\Users\Ben\Documents\dev\customer-service\extensions\intercom\package.json. The command must be run in a LoopBack project.

This is because @loopback/core is not listed in dependencies. Yes it is both a devDependency and a peerDependency in a loopback extension. This was last discussed in #2163 and implemented in #2166.

Wouldn't it be a better developer experience if the command accepted @loopback/core as a peerDependency?

Logs
$ lb4 model

No change to package.json was detected. No package manager install will be executed.
Generation is aborted: Error: No `@loopback/core` package found in the "dependencies" section of C:\Users\Ben\Documents\dev\customer-service\extensions\intercom\package.json. The command must be run in a LoopBack project.
Additional information

No response

Reproduction

n/a

Ngôn ngữ chính
TypeScript
Star
5.1k
Fork
1.1k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
44

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

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 loopbackio/loopback-next

Tất cả issue của loopbackio/loopback-next

Issue tương tự

Thêm issue về TypeScript

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.