{"id":15821596,"url":"https://github.com/dgp1130/nodejs_binary_host","last_synced_at":"2026-02-06T03:32:10.545Z","repository":{"id":115117280,"uuid":"329489337","full_name":"dgp1130/nodejs_binary_host","owner":"dgp1130","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-14T03:02:14.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T03:38:28.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgp1130.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-14T02:47:34.000Z","updated_at":"2021-01-14T03:02:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"663fd638-3f81-49e5-8324-cd51d6d02332","html_url":"https://github.com/dgp1130/nodejs_binary_host","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dgp1130/nodejs_binary_host","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgp1130%2Fnodejs_binary_host","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgp1130%2Fnodejs_binary_host/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgp1130%2Fnodejs_binary_host/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgp1130%2Fnodejs_binary_host/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgp1130","download_url":"https://codeload.github.com/dgp1130/nodejs_binary_host/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgp1130%2Fnodejs_binary_host/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29148150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T07:40:28.043Z","updated_at":"2026-02-06T03:32:10.527Z","avatar_url":"https://github.com/dgp1130.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `rules_nodejs` bug reproduction\n\nWhen executing a `nodejs_binary()` target with the `host` configuration as a\nbuild tool (via `npm_package_bin()` or `run_node()`), absolute imports cannot be\nresolved at runtime, even with `link_workspace_root = True`.\n\nTo reproduce:\n\n```\n$ npm install\n\n$ bazel run //:tool # Works\nINFO: Invocation ID: e363ba04-7aa2-47ef-9c70-3122a4696f03\nINFO: Analyzed target //:tool (0 packages loaded, 8 targets configured).\nINFO: Found 1 target...\nTarget //:tool up-to-date:\n  dist/bin/tool.sh\n  dist/bin/tool_loader.js\n  dist/bin/tool_require_patch.js\nINFO: Elapsed time: 0.305s, Critical Path: 0.01s\nINFO: 1 process: 1 internal.\nINFO: Build completed successfully, 1 total action\nINFO: Build completed successfully, 1 total action\nbar\nbaz\n\n$ bazel build //:npm_package_bin # Fails\nINFO: Invocation ID: b585aea3-7b71-406d-a17b-e8af22cfc495\nINFO: Analyzed target //:npm_package_bin (0 packages loaded, 1 target configured).\nINFO: Found 1 target...\nERROR: /home/dparker/Source/nodejs_binary_host/BUILD.bazel:5:16: Action output.txt failed (Exit 1) tool.sh failed: error executing command bazel-out/host/bin/tool.sh '--bazel_node_modules_manifest=bazel-out/k8-fastbuild/bin/_npm_package_bin.module_mappings.json'\n\nUse --sandbox_debug to see verbose messages from the sandbox\ninternal/modules/cjs/loader.js:797\n    throw err;\n    ^\n\nError: Cannot find module 'nodejs_binary_host/baz'\nRequire stack:\n- /home/dparker/.cache/bazel/_bazel_dparker/495c75b6438049fb6deb585ddc366361/sandbox/linux-sandbox/10/execroot/nodejs_binary_host/bazel-out/host/bin/tool.sh.runfiles/nodejs_binary_host/foo.js\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:687:27)\n    at Module.require (internal/modules/cjs/loader.js:849:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at Object.\u003canonymous\u003e (/home/dparker/.cache/bazel/_bazel_dparker/495c75b6438049fb6deb585ddc366361/sandbox/linux-sandbox/10/execroot/nodejs_binary_host/bazel-out/host/bin/tool.sh.runfiles/nodejs_binary_host/foo.js:4:13)\n    at Module._compile (internal/modules/cjs/loader.js:956:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)\n    at Module.load (internal/modules/cjs/loader.js:812:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:724:14)\n    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: [\n    '/home/dparker/.cache/bazel/_bazel_dparker/495c75b6438049fb6deb585ddc366361/sandbox/linux-sandbox/10/execroot/nodejs_binary_host/bazel-out/host/bin/tool.sh.runfiles/nodejs_binary_host/foo.js'\n  ]\n}\nTarget //:npm_package_bin failed to build\nUse --verbose_failures to see the command lines of failed build steps.\nINFO: Elapsed time: 0.309s, Critical Path: 0.09s\nINFO: 3 processes: 3 internal.\nFAILED: Build did NOT complete successfully\n\n$ bazel build //:run_node # Fails\nINFO: Invocation ID: 48e1e6c2-ff6f-4480-b0a2-a69e1380469a\nINFO: Analyzed target //:run_node (0 packages loaded, 0 targets configured).\nINFO: Found 1 target...\nERROR: /home/dparker/Source/nodejs_binary_host/BUILD.bazel:11:8: Action run_node failed (Exit 1) tool.sh failed: error executing command bazel-out/host/bin/tool.sh '--bazel_node_modules_manifest=bazel-out/k8-fastbuild/bin/_run_node.module_mappings.json'\n\nUse --sandbox_debug to see verbose messages from the sandbox\ninternal/modules/cjs/loader.js:797\n    throw err;\n    ^\n\nError: Cannot find module 'nodejs_binary_host/baz'\nRequire stack:\n- /home/dparker/.cache/bazel/_bazel_dparker/495c75b6438049fb6deb585ddc366361/sandbox/linux-sandbox/11/execroot/nodejs_binary_host/bazel-out/host/bin/tool.sh.runfiles/nodejs_binary_host/foo.js\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:687:27)\n    at Module.require (internal/modules/cjs/loader.js:849:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at Object.\u003canonymous\u003e (/home/dparker/.cache/bazel/_bazel_dparker/495c75b6438049fb6deb585ddc366361/sandbox/linux-sandbox/11/execroot/nodejs_binary_host/bazel-out/host/bin/tool.sh.runfiles/nodejs_binary_host/foo.js:4:13)\n    at Module._compile (internal/modules/cjs/loader.js:956:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)\n    at Module.load (internal/modules/cjs/loader.js:812:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:724:14)\n    at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: [\n    '/home/dparker/.cache/bazel/_bazel_dparker/495c75b6438049fb6deb585ddc366361/sandbox/linux-sandbox/11/execroot/nodejs_binary_host/bazel-out/host/bin/tool.sh.runfiles/nodejs_binary_host/foo.js'\n  ]\n}\nTarget //:run_node failed to build\nUse --verbose_failures to see the command lines of failed build steps.\nINFO: Elapsed time: 0.291s, Critical Path: 0.10s\nINFO: 2 processes: 2 internal.\nFAILED: Build did NOT complete successfully\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgp1130%2Fnodejs_binary_host","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgp1130%2Fnodejs_binary_host","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgp1130%2Fnodejs_binary_host/lists"}