错误:EMFILE:胜利时打开的文件过多 [英] Error: EMFILE: too many open files on win

查看:460
本文介绍了错误:EMFILE:胜利时打开的文件过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建类似Vscode的应用程序,然后我编写了自己的Vscode扩展并将其放入源代码中,效果很好。但是在我使用gulp命令打包我的应用程序后,这是一个错误:(在Mac OS上有效)

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' 

有人可以在Windows上解决此问题吗???

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

推荐答案

不确定是不是同样的问题,如果是-投票支持我的答案,否则-继续搜索。

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

使用Visual Studio或可视代码进行调试时-Visual Studio将调试会话的日志保存在文件%TEMP%\vscode-node-debug2.txt 中。

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

还有许多 EMFILE 日志条目,但它们不是失败的根本原因。

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

在我的情况下,根本原因是我在路径中使用了特殊字符- D:\!deleteme!\VueJsApp -我已经通过简单地创建没有感叹号的目录来解决了这个问题。

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.

还没 能够调试VueJsApp-我怀疑是由于.vue导致.js转换,但是普通的javascript仍然可以调试。

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.

这篇关于错误:EMFILE:胜利时打开的文件过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆