Javascript events.js:160投掷者;//未处理';错误';事件
我所做的项目是大口大口地完成的 最近,我将节点版本更新为v6.3.1。然后出了点问题 名为“html”的任务引发错误。下面是它的部分错误代码Javascript events.js:160投掷者;//未处理';错误';事件,javascript,node.js,gulp,node-modules,gulp-load-plugins,Javascript,Node.js,Gulp,Node Modules,Gulp Load Plugins,我所做的项目是大口大口地完成的 最近,我将节点版本更新为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 ver
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'));
});
我在谷歌上搜索了很多,但没有找到适合我的正确答案。最近,我将节点版本更改为v5.10.0,一切正常。删除node_modules文件夹,清除npm缓存文件,重新安装,解决了这个问题
rm -rf node_modules && npm cache clean --force && npm install
来源:我在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安装gems(在完成系统重新安装之后)
所以,我的治疗方法是:
gem install jekyll
就我而言,端口已在使用中
#netstat-nltp
检查是否有任何正在尝试从…开始的端口运行的东西。如果是,请更改端口并重试
在某些情况下,如果使用静态IP,则IP地址也可能错误,这与以下行中的错误有关:
events.js:160
throw er; // Unhandled 'error' event
我的问题是,我已经在另一个本地节点应用程序上打开了端口
停止其他应用程序解决了该问题 尝试停止其他吞咽过程
ps -ax | grep gulp
kill -9 <number>
ps-ax | grep-gulp
杀死-9
events.js:160
这是因为
我在启动laravel echo服务器npm包时遇到了相同的错误。PFA图像供参考。我认为,如果你因为任何npm软件包而出现错误,这个答案将对你有所帮助 我是如何找到解决方案的:
- 我的域未正确配置。检查图像,我正在尝试点击pid.contentcentral.co域,该域已被禁用或未正确配置。因此抛出错误。配置中的更正和问题已解决
- 错误:在Node.js中侦听EADDRNOTAVAIL错误 当您看到这一行出错时,不是端口,而是您的IP地址/域出现了一些问题
- 错误:请使用侦听器 当您看到这行错误时,不是您的IP地址/域,而是端口出现了一些问题,可能已经在使用中
npm start
当我运行sudo npm start
我认为问题可能是应用程序没有足够的权限 在运行命令npm start时,我在Ubuntu上遇到了类似的错误 运行sudo npm start解决了我的问题 我认为这是因为文件夹没有Morgan logger的写入权限 解决方案: $event=>只能用于.ts文件
$scope.openFromCalendar = ($event) => {
$event.preventDefault();
$event.stopPropagation();
$scope.fromCalendarOpened = true;
$scope.ToCalendarOpened = false;
};
如果您使用的是.js文件,请像这样使用它
$scope.openFromCalendar = function ($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.fromCalendarOpened = true;
$scope.ToCalendarOpened = false;
};
尝试运行以下命令,然后执行您的操作,您希望执行
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
我希望它能起作用。设置环境变量窗口/system32
它将适用于windows此问题的可能重复是一个非常令人头痛的问题,答案是:干杯!请添加一些代码,以便其他用户可以测试您所描述的内容。谢谢这并不能回答这个问题。您可以,也可以参考页面右侧的相关和链接问题来找到答案。如果您有一个相关但不同的问题,并包含指向此问题的链接以帮助提供上下文。请参阅:在我的例子中,这是在重命名由
create app
cmd创建的原始文件夹后发生的。要记住的东西。对我来说,重启电脑后,它需要一直清除。有没有办法避免这个问题?如果需要,请提供所有步骤的解决方案。