Simple express example not working
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- express, javascript, nodejs
- 领域
- backend, build-system
调研方向
从 WORKSPACE 设置和使用 node_binary 的 BUILD 规则开始,然后使用 bazel run :binary 重现失败。检查生成的 express 依赖如何向 runfiles 树贡献路径,尤其是为 History.md 报告的绝对路径。示例能够在不出现绝对路径错误的情况下构建并运行即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 53
- 派生
- 11
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dropbox/rules_node 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 45/100
dropbox/rules_node#19 ·
-
难度 2/5 1-3 小时 新手友好度 38/100
dropbox/rules_node#18 ·
-
难度 4/5 3-5 天 新手友好度 20/100
dropbox/rules_node#16 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
dropbox/rules_node#6 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
dropbox/rules_node#3 · 3 条评论 ·
查看 dropbox/rules_node 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
raullenchai/Rapid-MLX#4042 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
LearningCircuit/local-deep-research#7067 ·
维护者通常 1 天内回复
-
#bug
难度 1/5 1 小时以内 新手友好度 92/100
apache/superset#44923 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
lawndoc/stack-back#123 ·