loopbackio / loopbackio/loopback-next

Detection of yarn does not work (anymore?)

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

Chưa có ai nhận issue này.

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

Mô tả

Describe the bug

While loopback-cli tries to detect yarn a file yarn-error.log is generated. It seems that yarn cannot write to it's stdout when it is spawned as a child process by lb4.

Logs
yarn-error.log:

Arguments: 
  /snap/node/7382/bin/node /snap/node/7382/bin/yarn.js help

PATH: 
  /usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Yarn version: 
  1.22.19

Node version: 
  19.9.0

Platform: 
  linux x64

Trace: 
  Error: EACCES: permission denied, write
      at writeSync (node:fs:938:3)
      at SyncWriteStream._write (node:internal/fs/sync_write_stream:26:3)
      at writeOrBuffer (node:internal/streams/writable:392:12)
      at _write (node:internal/streams/writable:333:10)
      at Writable.write (node:internal/streams/writable:337:10)
      at module.exports.Command.outputHelp (/snap/node/7382/lib/cli.js:58339:18)
      at module.exports.Command.help (/snap/node/7382/lib/cli.js:58350:8)
      at Object.run (/snap/node/7382/lib/cli.js:83978:13)
      at run (/snap/node/7382/lib/cli.js:88392:22)
      at /snap/node/7382/lib/cli.js:88722:16

npm manifest: 
  No manifest

yarn manifest: 
  No manifest

Lockfile: 
  No lockfile
Additional information

This issue can be fixed by using stdio: 'ignore' instead of stdio: false here: https://github.com/loopbackio/loopback-next/blob/9d99c620e7dedad9099e1c83a068216c198749e0/packages/cli/lib/utils.js#L768

Reproduction

none

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

Mở 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.

Hướng nghiên cứu

Bắt đầu tại packages/cli/lib/utils.js, khoảng dòng 768, nơi yarn được khởi chạy trong quá trình phát hiện, và so sánh thiết lập stdio hiện tại với thay đổi được đề xuất trong issue. Xác minh rằng việc phát hiện yarn không còn tạo ra yarn-error.log hoặc gây ra lỗi EACCES đối với stdout khi được chạy dưới dạng tiến trình con của lb4; không có bản tái hiện hoặc tệp kiểm thử nào được cung cấp.

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

Đánh giá

Công nghệ
nodejs, typescript
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả 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.