- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
各位网友大家早上好,
同时遵循Angular2 Quickstart我多次遇到过这样的问题:lite-server
在执行 npm start
后就会崩溃。崩溃在你的终端中看起来像这样:
ERR! Linux 3.19.0-51-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite"
npm ERR! node v5.7.0
npm ERR! npm
v3.8.2
npm ERR! code ELIFECYCLE
npm ERR! angular2-quickstart@1.0.0 lite: `lite-server`
npm ERR!
Exit status 1
npm ERR!
npm ERR! Failed at the angular2-quickstart@1.0.0 lite script 'lite-server'.
npm
ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR!
Tell the author that this fails on your system:
npm ERR! lite-server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/oscar/dev/cw/npm-debug.log
大多数时候,原因是以下两个之一:
lite-server
未正确关闭。 解决方案:杀死所有 npm/node 实例并使用 npm start
重新启动服务器即可解决问题。node_modules
目录,执行 npm install
来重建依赖项即可。但是,当到达名为 6.Routing 的步骤时,问题有点不同。这次,它没有立即崩溃,而是在 typescript 编译后失败:
16.03.15 16:33:49 200 GET /index.html
events.js:154
throw er; // Unhandled 'error' event
^
Error: watch node_modules/angular2/es6/prod/examples/platform/dom/debug/ts/debug_element_view_listener ENOSPC
at exports._errnoException (util.js:856:11)
...
at FSReqWrap.oncomplete (fs.js:82:15)
最佳答案
我已经找到了崩溃的原因。我想分享这个路径,这样它可能会帮助其他人,因为有很多论坛/stackoverflow 线程围绕同一类问题,但没有一个解决了这个崩溃。
基本上,我查看了堆栈跟踪来查找哪个“模块”出现故障。在这里
at FSReqWrap.oncomplete (fs.js:82:15)
解决方案是执行以下命令(请参阅 this ticket ):
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
但我不只是执行它,而是需要理解为什么将配置项 fs.inotify.max_user_watches
设置为 524288
到 /etc/sysctl.conf
位于系统文件之后。我找到了答案here它说,我引用:
Nodejs would report an error if there's too many files for watching due to system limitation, on Linux you can change that by adding fs.inotify.max_user_watches = 524288 to the file etc/sysctl.conf and restart the process
希望有帮助。
关于node.js - Angular2 快速入门精简版服务器崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36016905/
我正在尝试在elisp中实现我自己的深层复制例程(因为类似(setq newlist oldlist)的东西似乎只能提供浅拷贝,而(copy-sequence newlist oldlist)仍然使n
您好,我正在开发客户端站点的交互性,我觉得我的按钮功能的 JS 和 carousel.fader 窗口的构建有点多余。有人可以看一下这段代码,看看是否可以进一步简化,以减少页面加载时间,实际上只是为了
我一直在优化我的网站,但阻碍我的一个问题是我不使用的所有 jQuery 函数。我唯一使用的是平滑的页面滚动器。这似乎是在浪费下载时间。 我的问题是:是否有任何脚本或程序可以删除我不需要的 jQuery
我在很大程度上不太擅长 javascript/jquery,但我知道如何让一些软件工作。但我的问题是我有一大堆 $("body").on("click", "button#thisid", funct
我的 Eclipse 3.5.2 (Ubuntu 10.10) 安装中安装了多个插件(Apatana、SVN、Pydev、Zend Debugger、PHP)。自从几年前我第一次使用 Eclipse
这个问题在这里已经有了答案: std::forward_list and std::forward_list::push_back (5 个答案) 关闭 5 年前。 我偶然发现了这段代码并试图理解它
我有一个非常简单的 jQuery 脚本,当输入元素获得焦点时,它会将宽度扩展到 250px(使用 focusin() 事件),当失去焦点时,它会缩小使用 focusout() 事件回到 200px。但
我一直在研究为什么 WYSIWYG 编辑器不利于内容创建。给出的最常见原因是它们输出不正确的 html。但是如果我使用功能减少的编辑器怎么办? 我的要求只是斜体、使文本加粗、创建有序/无序列表和(可能
我一直在与 MVVM 模式作斗争,并且在尝试为小型/中型项目创建实用设计时遇到了许多挑战。其中一项挑战是弄清楚如何在不创建大量重复且难以维护的代码的情况下获得与此模式分离的好处。 我目前的策略是创建“
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
从MVC模式和Symfony2的角度来看,我可以瘦身吗? Controller 代码 一点点,移开一些持久化逻辑 ?例如,给定一个标准的新 Action ,如下所示: public function
我打算使用适用于 Android 的 ARM DS5 Streamline。 要将 Streamline 与您的 Android 目标一起使用,您必须构建 Gator 驱动程序 gator.ko 并将
我正在使用 LESS ( http://lesscss.org ),它说 ... JavaScript evaluation JavaScript expressions can be evaluat
我一直在研究使用 EventMachine 为一些工作做后台处理的可能性。在 Sinatra 中,这似乎工作得很好,但 Rails 3 似乎在呈现 View 之前执行所有滴答。 当我在瘦网络服务器下运
if SOMETHING charge = Object (this object has a method ID) end DiffObject.update_attributes(specif
我是一名优秀的程序员,十分优秀!