Skip to content

EMFILE: too many open files on ng build #2745

Closed

Description

@mihaivarga

OS?

Windows 10

Versions.

angular-cli: 1.0.0-beta.17
node: 6.3.0
os: win32 x64

Repro steps.

Assets folder contains 2600+ files.
Run: ng build --prod

The log given by the failure.

16000ms building modules
57ms sealing
1ms optimizing
0ms basic module optimization
227ms module optimization
1ms advanced module optimization
29ms basic chunk optimization
1ms chunk optimization
0ms advanced chunk optimization
0ms module and chunk tree optimization
129ms module reviving
12ms module order optimization
13ms module id optimization
7ms chunk reviving
34ms chunk order optimization
48ms chunk id optimization
99ms hashing
2ms module assets processing
215ms chunk assets processing
7ms additional chunk assets processing
0ms recording
0ms additional asset processing
4266ms chunk asset optimization
4012ms asset optimization
95% emitting{ Error: EMFILE: too many open files, open '\app\dist\assets\ckeditor\plugins\smiley\lang\el.js'
at Error (native)
errno: -4066,
code: 'EMFILE',
syscall: 'open',
path: '\app\dist\assets\ckeditor\plugins\smiley\lang\el.js' }
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^

Error: EMFILE: too many open files, open '\app\node_modules\webpack\lib\Compiler.js'
at Error (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at getErrorSource (\app\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:379:21)
at printErrorAndExit (\app\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:395:16)
at process.emit (\app\node_modules\awesome-typescript-loader\node_modules\source-map-support\source-map-support.js:415:16)
at process._fatalException (bootstrap_node.js:254:26)

Mention any other details that might be useful.

I have to copy assets manually each time.

I removed full path from log due to client privacy.

Activity

  1. filipesilva commented on Oct 17, 2016

    @filipesilva
    Contributor

    #2570 should help fix this, it'll come out on the next release.

  2. tallaxes commented on Oct 20, 2016

    @tallaxes
  3. joao-fidalgo commented on Mar 6, 2017

    @joao-fidalgo

    This problem is still occurring on @angular/cli@1.0.0-rc.1

  4. gentlemanjohn commented on Jun 27, 2017

    @gentlemanjohn

    Still an issue on 1.1.3

  5. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions