在MAC上启动nodejs,遇到了一个问题:

主要大概是说文件打开太多了,超过了限制。

产生这个问题主要是苹果操作系统的限制,具体参考这个ISSUE

I'm glad this is solving it for everyone. Unfortunately, Apple sets ridiculously low limits by default which might be good for some users, but is awful for developers.
For what it's worth, I would recommend setting the limit much much higher than 65536 (524288 is great).
Additionally, I would recommend using a method that doesn't modify /etc/ files directly since throughout the years Apple has randomly decided to stop loading these files (for example, it used to be a common recommendation to put this in /etc/launchd.conf, but that no longer works in Yosemite).

解决办法的设置如下:

echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
sudo sysctl -w kern.maxfiles=65536
sudo sysctl -w kern.maxfilesperproc=65536
ulimit -n 65536

node.js 报错Error: ENFILE: file table overflow...ENFILE: file table overflow, open...相关推荐

  1. node.js报错“Error: EBUSY: resource busy or locked, stat“

    异常 Error: EBUSY: resource busy or locked, stat 'C:\swapfile.sys'at Object.statSync (node:fs:1536:3)a ...

  2. node.js报错“Error: EPERM: operation not permitted, stat ‘C:\Recovery‘“

    异常 node:internal/fs/utils:344throw err;^Error: EPERM: operation not permitted, stat 'C:\Recovery'at ...

  3. git报错error: index uses extension, fatal: index file corrupt

    git报错 error: index uses extension, which we do not understand fatal: index file corrupt 用git 拉取代码时,遇 ...

  4. 加载.node文件报错:no suitable image found. unknown file type, first eight bytes

    背景 electron-vue构建的工程在打包的时候报错如下: Uncaught Error: Cannot open /Users/mac/Desktop/file/zl/git_project/n ...

  5. sublime运行node.js报[Decode error - output not cp936]错误

    报错原因是我们的代码中可能有中文输出,例如我的代码如下: //express_demo.js 文件 var express = require('express'); var app = expres ...

  6. 安装rabbitMq报错:error: unpacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_server-3.8.9

    安装rabbitMq报错: 错误提示:error: unpagacking of archive failed on file /usr/lib/rabbitmq/lib/rabbitmq_serve ...

  7. Node js报错 npm ERR! cb() never called!

    操作系统windows server2008 ,node版本0.10.19 应用npm安装express 执行如下语句:npm install express -gd 报错如下: 各种google,最 ...

  8. 02_Keil5报错 error: #5: cannot open source input file “XXX.h”: No such file or directory解决方法

    Keil5  error: #5: cannot open source input file "led.h": No such file or directory 是找不到包含文 ...

  9. Redis 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法

    错误描述 安装Redis 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmall ...

最新文章

  1. 动态内存管理和智能指针 2.0 -- shared_ptr
  2. noip2016普及组 魔法阵vijos2012
  3. 程序员真的是吃青春饭的吗?(献给即将进入职场的程序员们)
  4. html生成原理,Axure生成HTML的原理是什么?
  5. oracle 月累计,oracle 可有什么方法 统计每月累积购买人数?
  6. SC15 供应商质量管理工程师(武汉)
  7. 样条曲面_用SolidWorks曲面将六个小圆管向大圆管过渡
  8. MATLAB GUI的界面归一化问题
  9. java numberformat异常_java – 解析货币值失败的NumberFormat
  10. 电子证件照尺寸怎样裁剪?怎么把照片裁剪成2寸?
  11. 移动端(html5)富文本编辑器,vue移动端中使用vue-html5-editor富文本编辑器详解
  12. 识别PDF文字的软件,得力OCR文字识别
  13. fatal: unable to access ‘http://g.oho168.com:88/yanjiaxue/anymz.git/‘: Could not resolve host: g.oho
  14. QlikView sheet权限
  15. sqlserver进阶必会基础入门不止select into from 插入数据必知
  16. NLP自然语言处理—主题模型LDA案例:挖掘人民网留言板文本数据
  17. python画三维(3D)图
  18. MDI窗体与子窗体的显示问题--(如何让主窗体是被控件挡住的子窗体显示)
  19. 上海手机移动软件开发论坛_前智能手机开发人员的现代移动软件开发
  20. 【C/C++进阶】输入的技巧

热门文章

  1. 关于滚动相关的属性【转】
  2. touch无法创建文件或者文档
  3. SpringBoot + MyBatis + Thymeleaf 之 HelloWorld
  4. 工作方式 柔らかいコミュニケーション
  5. SimpleDateFormat 线程不安全及解决方案
  6. (Windows7)Visual Studio 2017编译运行出现脚本错误的解决方法
  7. DataGridView 控件中DataBind( )方法不能使用的情况的解决方案
  8. MyBatis多个接口参数报错:Available parameters are [0, 1, param1, param2], 及解决方法
  9. 博图帮助乱码解决方法
  10. Maven 无法下载依赖包的解决方法---三步dao!!!