Skip to content

[Angular 5] Error: ENFILE: file table overflow #1079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vchimev opened this issue Nov 7, 2017 · 3 comments · Fixed by telerik/mobile-cli-lib#1036 or NativeScript/nativescript-cli#3277
Milestone

Comments

@vchimev
Copy link
Contributor

vchimev commented Nov 7, 2017

Error:

Error: ENFILE: file table overflow

Description:

It looks like the {N} CLI running a NativeScript-Angluar 5 project hits the issue with Node process monitoring too many open files at once related to the new i18n.

Workaround:

This blog post.

Steps to reproduce:

git clone [email protected]:NativeScript/sample-Groceries.git && cd sample-Groceries
npm install --save nativescript-angular@rc
./node_modules/.bin/update-app-ng-deps
tns run android

Output:

Project successfully built.
Installing...
Successfully installed on device with identifier 'emulator-5554'.
Unable to apply changes on device: emulator-5554. Error is: ENFILE: file table overflow, open '/Users/vchimev/Work/git/sample-Groceries/platforms/android/src/main/assets/app/tns_modules/tns-core-modules/ui/layouts/dock-layout/dock-layout-common.js'.
The project file undefined is corrupted.
Consider restoring an earlier version from your source control or backup.
Additional technical info: Error: ENFILE: file table overflow, open '/Users/vchimev/Work/git/sample-Groceries/package.json'
Failed to display command help { Error: ENFILE: file table overflow, open '/usr/local/lib/node_modules/nativescript/lib/common/commands/help.js'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.Module._extensions..js (module.js:645:20)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Yok.resolveDependency (/usr/local/lib/node_modules/nativescript/lib/common/yok.js:338:13)
    at Yok.resolveByName (/usr/local/lib/node_modules/nativescript/lib/common/yok.js:315:31)
  errno: -23,
  code: 'ENFILE',
  syscall: 'open',
  path: '/usr/local/lib/node_modules/nativescript/lib/common/commands/help.js' }

Related to #1073.

@TomK32
Copy link

TomK32 commented Nov 10, 2017

I put a simple console.log(name) into /usr/local/lib/node_modules/nativescript/lib/common/yok.js resolveDependency and looks like logger is requiring itself somewhere causing an endless loop.

@sis0k0
Copy link
Contributor

sis0k0 commented Dec 20, 2017

@sis0k0 sis0k0 closed this as completed Dec 20, 2017
@ghost ghost removed backlog bug labels Dec 20, 2017
@flynsequeira
Copy link

Facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants