启动 todos 示例时出错 [英] error starting todos example

查看:43
本文介绍了启动 todos 示例时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里的菜鸟.在 linux 上,我安装了meteor,尝试加载todos"应用程序,但出现此错误.它似乎与文件系统监控有关?我错过了包裹或烫发吗?我用sudo安装了meteor,但我安装了todos"作为我的基本用户.

noob here. on linux, i installed meteor, tried to load 'todos' app, got this error. it seems to be related to file system monitoring? am i missing a package or perm? i installed meteor with sudo, but i installed the 'todos' as my basic user.

提前致谢!

~$ mkdir meteorDev
~$ cd meteorDev/
~/meteorDev$ meteor create --example todos
todos: created.

To run your new app:
   cd todos
   meteor
~/meteorDev$ cd todos/
~/meteorDev/todos$ meteor
[[[[[ ~/meteorDev/todos ]]]]]

Running on: http://localhost:3000/

fs.js:663
    throw errnoException(errno, 'watch');
          ^
Error: watch EMFILE
    at errnoException (fs.js:636:11)
    at FSWatcher.start (fs.js:663:11)
    at Object.watch (fs.js:691:11)
    at [object Object]._scan (/usr/lib/meteor/app/meteor/run.js:322:12)
    at Array.forEach (native)
    at Function.<anonymous> (/usr/lib/meteor/app/lib/third/underscore.js:76:11)
    at new <anonymous> (/usr/lib/meteor/app/meteor/run.js:264:5)
    at /usr/lib/meteor/app/meteor/run.js:455:17
    at /usr/lib/meteor/app/meteor/run.js:512:5
    at /usr/lib/meteor/app/meteor/run.js:570:9

推荐答案

Meteor 使用 node 的fs.watch"命令,它使用了 linux 的 inotify API.您的系统可能没有 inotify 支持,或者它已关闭.试试这个,看看你是否启用了 inotify:

Meteor uses node's "fs.watch" command, which uses linux's inotify API. It is possible your system does not have inotify support, or it is turned off. Try this to see if you have inotify enabled:

 cat /proc/sys/fs/inotify/max_user_instances

如果该文件存在并且其中的数量较少,请尝试以 root 身份以达到上限:

If that file exists and has a low number in it, try this as root to up the limit:

 echo 8192 > /proc/sys/fs/inotify/max_user_instances

如果该文件不存在,则可能是您的系统不支持 inotify 或以某种方式关闭了.

If that file does not exist, it is likely your system does not support inotify or it is somehow turned off.

max_user_instances 的增加是暂时的,重启后不会持续.使其永久化:

The increase in max_user_instances is temporary and won't persist after a reboot. To make it permanent:

 echo fs.inotify.max_user_instances=8192 | sudo tee /etc/sysctl.d/10-inotify.conf && sudo sysctl -p

这篇关于启动 todos 示例时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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