events.js:160扔呃; //未处理“错误”事件

我所从事的这个项目是用吞噬build造的。

最近我更新了节点版本到v6.3.1。 然后出现了一些问题。

名为“html”的任务会引发错误。 这是它的错误代码的一部分。

bogon:toClient work$ gulp html (node:2519) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. [10:26:10] Using gulpfile ~/Project/TIME_Cancer_Treatment_Centers_of_America(CTCA)/toClient/gulpfile.js [10:26:10] Starting 'html'... (node:2519) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. events.js:160 throw er; // Unhandled 'error' event ^ Error: CSS parse error scripts/vendor.js: Unexpected input 1 |!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function i(t){var e="length"in t&&t.length,i=J.type(t);return"function"!==i&&!J.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===i||0===e|| 

而任务'html'的代码:

 var $ = require('gulp-load-plugins')(); gulp.task('html', function() { var assets = $.useref.assets({searchPath: ['.tmp']}); return gulp.src('app/*.html') .pipe(assets) .pipe($.if('*.js', $.uglify())) .pipe($.if('*.css', $.csso())) .pipe(assets.restore()) .pipe($.useref()) .pipe($.if('*.html', $.minifyHtml({conditionals: true, loose: true}))) .pipe(gulp.dest('dist')); }); 

我GOOGLE了很多,但我还没有find适合我的正确答案。

删除node_modules文件夹并进行全新安装,为我解决了这个问题。

 rm -rf node_modules && npm cache clean --force && npm install 

我正在运行节点v6.7.0

来源: https : //github.com/ember-cli/ember-cli/issues/3087#issuecomment-71327402

关于以下行的错误:

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

我的问题是,我已经在另一个本地节点的应用程序打开端口。

停止其他应用程序解决了这个问题。

最近,我将节点版本更改为v5.10.0,一切正常。

我有与events.js类似的问题。

 [19:59:06] Starting 'jekyll-async'... events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:1011:11) at Process.ChildProcess._handle.onexit (child_process.js:802:34) 

在我的情况下,发生问题,因为我忘记从我的Gemfile中安装gem(完成系统重新安装后)。

所以,治好我是:

 gem install jekyll 

在我的情况下,港口已经在使用..

 # netstat -nltp 

检查是否有任何东西运行与端口正试图开始..如果是更改端口和尝试。

如果使用静态IP,某些情况下IP地址也可能会出错

您可以卸载您的节点,并安装最新版本。