EXCLUDE_GLOBS causes failure for directory with a git submodule

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

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
git, javascript, node.js
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Start by reproducing the failure with node-lambda package, a local file:sub-module dependency, and EXCLUDE_GLOBS="sub-module". Inspect the packaging flow around lib/main.js:543 and how EXCLUDE_GLOBS handles submodule directories. Done means the directory can be excluded without npm install failing, while the workaround does not leave sub-module/package.json in the archive.

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

Mô tả

bug

If a git submodule is listed in package.json

  "dependencies": {
  ....
    "sub-module": "file:sub-module"
  },

and the directory name is within EXCLUDE_GLOBS
EXCLUDE_GLOBS="sub-module"
the following error occurs.

As a workaround, one can exclude the directory content EXCLUDE_GLOBS="sub-module/*", but this leaves sub-module/package.json in the zip file.

$ node-lambda package
Warning!!! You are building on a platform that is not 64-bit Linux (darwin.x64). If any of your Node dependencies include C-extensions, they may not work as expected in the Lambda environment.


=> Moving files to temporary directory
=> Running npm install --production
/usr/local/lib/node_modules/node-lambda/lib/main.js:543
      throw err;
      ^

Error: Command failed: npm -s install --production --prefix /var/folders/4c/b2p9cxl9699211w4mps998g40000gp/T/apiAccess-1494407987225

    at ChildProcess.exithandler (child_process.js:204:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:886:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)
$ 
Ngôn ngữ chính
JavaScript
Star
1.4k
Fork
185
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

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 motdotla/node-lambda

Tất cả issue của motdotla/node-lambda

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.