You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
generate_build_file.ts performs recursive filesystem operations asynchronously without any form of rate limiting or handling of errors relating to reaching file descriptor limits.
This can lead to the script failing with an EMFILE error.
🔬 Minimal Reproduction
Unfortunately this issue does not lend itself to a minimal reproduction. It's dependent on size of the node_modules folder and system-specific ulimit configuration. Also, it's non-deterministic.
🔥 Exception or Error
INFO: Repository npm instantiated at:
/Users/mzhou/figma/figma/WORKSPACE.bazel:85:12: in
/private/var/tmp/_bazel_mzhou/529a40494971fd74139c7ccd5277dbfc/external/build_bazel_rules_nodejs/index.bzl:78:17: in npm_install
Repository rule npm_install defined at:
/private/var/tmp/_bazel_mzhou/529a40494971fd74139c7ccd5277dbfc/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:786:30: in
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "/private/var/tmp/_bazel_mzhou/529a40494971fd74139c7ccd5277dbfc/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 784, column 24, in _npm_install_impl
_create_build_files(repository_ctx, "npm_install", node, repository_ctx.attr.package_lock_json, repository_ctx.attr.generate_local_modules_build_files)
File "/private/var/tmp/_bazel_mzhou/529a40494971fd74139c7ccd5277dbfc/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 490, column 13, in _create_build_files
fail("generate_build_file.ts failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (result.stdout, result.stderr))
Error in fail: generate_build_file.ts failed:
STDOUT:
STDERR:
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: EMFILE: too many open files, open '_/node_modules/@types/babel__generator/package.json'] {
errno: -24,
code: 'EMFILE',
syscall: 'open',
path: '_/node_modules/@types/babel__generator/package.json'
}
🌍 Your Environment
Operating System:
Output of bazel version:
Rules_nodejs version:
5.5.2
The text was updated successfully, but these errors were encountered:
🐞 bug report
Affected Rule
The issue is caused by the rule:
npm_install
Is this a regression?
This likely regressed in e3963e1.
Description
generate_build_file.ts performs recursive filesystem operations asynchronously without any form of rate limiting or handling of errors relating to reaching file descriptor limits.
https://github.com/bazelbuild/rules_nodejs/blob/0be0eeb12bd525773f4504c13b5d799e1b2780a1/internal/npm_install/generate_build_file.ts#L689-L705
This can lead to the script failing with an EMFILE error.
🔬 Minimal Reproduction
Unfortunately this issue does not lend itself to a minimal reproduction. It's dependent on size of the node_modules folder and system-specific ulimit configuration. Also, it's non-deterministic.
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_nodejs version:
5.5.2
The text was updated successfully, but these errors were encountered: