Error: EMFILE: too many open files on win

跟風遠走 提交于 2019-12-12 10:14:29

问题


I was building an Vscode-like App, and I wrote my own extension to Vscode and put it into source code, it's work fine. But after I use gulp command to package my app, here is sth wrong :(On mac OS it's worked)

[17:07:59] Finished 'optimize-vscode' after 23 s
[17:07:59] Starting 'vscode-win32-x64'...
[17:08:31] Downloading extension: ms-vscode.node-debug2@1.25.6 ...
[17:08:32] Downloading extension: ms-vscode.node-debug@1.25.4 ...

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: EMFILE: too many open files, open 'C:\Gitlab-Runner\builds\251c7da1\0\Haochen_super\IDE\extensions\hap-transformer\node_modules\qa-transformer\build\core\transformers\style\rules\declaration\dimension.js' 

Can some one help me out on windows with this problem????


回答1:


Not sure is this is the same problem or not, if it's - up vote my answer, if not - just continue to search.

When debugging with visual studio or visual code - visual studio keep logs of debugging session in file %TEMP%\vscode-node-debug2.txt.

It's indeed long log text, which is difficult to read and moreover understand what went wrong. But in my case I've found following log entry (somewhere close to the end of log):

↠From target: {"method":"Runtime.consoleAPICalled","params":{"type":"error","args":[{"type":"string","value":"WebpackO
ptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does
not match the API schema.\n - configuration.context: The provided value \"D:\\\\!deleteme!\\\\VuejsApp1\\\\VuejsApp1\" co
ntains exclamation mark (!) which is not allowed because it's reserved for loader syntax.\n   -\u003E The base directory

There were also a lot of EMFILE log entries, but they were not a root cause of failure.

Root cause in my case was that I have used special character in path - D:\!deleteme!\VueJsApp - and I have fixed it by simply creating directory without exclamation mark.

I was still not being able to debug VueJsApp - I suspect due to .vue to .js conversions, but normal javascript was possible to debug still.



来源:https://stackoverflow.com/questions/52402287/error-emfile-too-many-open-files-on-win

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!