Simple express example not working
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
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- express, javascript, nodejs
- Lĩnh vực
- backend, build-system
Hướng nghiên cứu
Bắt đầu với thiết lập WORKSPACE và quy tắc BUILD sử dụng node_binary, sau đó tái hiện lỗi bằng bazel run :binary. Kiểm tra cách dependency express được tạo ra đóng góp các đường dẫn vào cây runfiles, đặc biệt là đường dẫn tuyệt đối được báo cáo cho History.md. Hoàn thành khi ví dụ có thể được build và chạy mà không gặp lỗi đường dẫn tuyệt đối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I am trying to put together a simple express example to try these out (since I've been able to get further with them than bazelbuild/rules_nodejs), and I'm running into an issue.
To reproduce (on top of standard WORKSPACE @ 4fe6494f):
# Set up express dependency.
# see: https://github.com/dropbox/rules_node/issues/3
bazel run @org_dropbox_rules_node//node/tools/npm:gen_build_npm -- [email protected] $PWD/
I then append (adding node_binary to the load()):
node_binary(
name = 'binary',
srcs = ['index.js'],
main = 'index.js',
deps = [
':express',
],
)
However, when I bazel run :binary I'm getting:
$ bazel run :binary
INFO: Analysed target //:binary (0 packages loaded).
INFO: Found 1 target...
ERROR: /home/mattmoor/trying-node/BUILD:334:1: Creating runfiles tree bazel-out/local-opt/bin/binary.runfiles failed (Exit 1)
_bin/build-runfiles (args bazel-out/local-opt/bin/binary.runfiles_manifest bazel-out/local-opt/bin/binary.runfiles): paths must not be absolute: line 1: '/node_modules/express/History.md /home/mattmoor/.cache/bazel/_bazel_mattmoor/e6c1f9a612e03cb822c6e33f6e63f45c/execroot/__main__/bazel-out/local-opt/bin/node_modules/express/History.md'
Target //:binary failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.647s, Critical Path: 1.38s
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
The contents of index.js don't even matter. Am I holding it wrong? Any workarounds?
Bazel version info:
$ bazel version
Build label: 0.7.0
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Oct 18 14:27:19 2017 (1508336839)
Build timestamp: 1508336839
Build timestamp as int: 1508336839
- Ngôn ngữ chính
- Python
- Star
- 53
- Fork
- 11
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 dropbox/rules_node
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
dropbox/rules_node#19 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
dropbox/rules_node#18 ·
-
Webpak Build ErrorĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
dropbox/rules_node#16 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
dropbox/rules_node#6 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
dropbox/rules_node#3 · 3 bình luận ·
Tất cả issue của dropbox/rules_node
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
BasedHardware/omi#20271 ·
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 92/100
openai/openai-cookbook#3153 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cvss-severity:high devguard l3montree-cybersecurity/devguard/devguard pkg:golang/github.com/l3montree-dev/devguard risk:low state:open
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
l3montree-dev/devguard#3146 · 1 bình luận ·
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
-
bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
open-webui/open-webui#31849 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày