events.js:141扔呃; //未处理“错误”事件 [英] events.js: 141 throw er; // Unhandled 'error' event

查看:308
本文介绍了events.js:141扔呃; //未处理“错误”事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Mac OS上运行节点4.2.2,但我不明白为什么每次遇到此错误消息时:

  events.js:141 
throw er; // unhandled'error'事件
^
错误:spawn / Users / user / Documents / Projects / project-x / node_modules / gifsicle / vendor / gifsicle ENOENT
at exports._errnoException(util
在Process.ChildProcess._handle.onexit(internal / child_process.js:178:32)
在onErrorNT(internal / child_process.js:344:16)
在doNTCallback2(node.js:441:9)
在process._tickCallback(node.js:355:17)
c12320:project-x用户$

发生了什么问题?
如果我运行gulp build,会有这样的输出:

  c12320:project-x user $ gulp build 
[15:13:41]使用gulpfile〜/ Documents / Projects / project-x / gulpfile.js
[15:13:41]启动'clean'...
[15: 13:41] 160微秒后完成'干净'
[15:13:41]启动'build'...
[15:13:41]启动'copy-assets'...
[15:13:41] 13 ms后完成'copy-assets'
[15:13:41]开始'minify-img'...
[15:13:41]启动'compile-css'...
[15:13:41]启动'compile-js'...
[15:13:41] 52 ms后完成'build'
[15:13:41]'minify-img'在468 ms后出错
[15:13:41] Error:EACCES:permission denied,mkdir'/ Users / user / Documents / Projects / project-x / public / assets / img / dummy'错误(本地)

资产/ js / 00-bootstrap.js
行3 col 5缺少use strict语句。

✖1错误⚠0警告

[15:13:41]水管工发现未处理的错误:
错误:EACCES:权限被拒绝,打开'/ Users / user / Documents / Projects / project-x / public / assets / css / develop.css'

assets / js / dev / lib / lodash.js
line 13 col 5 Missinguse严格声明。
第13行col 9期望一个标识符,而是看到'undefined'(一个保留字)。
第217行col 12字符串必须使用单引号。
第227行col 21字符串必须使用单引号。
第249行col 12字符串必须使用单引号。
第249行col 17字符串必须使用单引号。
第263行col 67预期'===',而是看到'=='。
第374行col 31期望'===',而是看到'=='。
第386行col 24预期'===',而是看到'=='。
第565行col 44预期'!==',而是看到'!='。
line 565 col 81预期'===',而是看到'=='。
第577行col 42预期'===',而是看到'=='。
line 589 col 85预期'===',而是看到'=='。
line 589 col 103期望'===',而是看到'=='。
line 589 col 123预期'===',而是看到'=='。
line 589 col 143预期'===',而是看到'=='。
line 590 col 62预计'===',而是看到'=='。
line 590 col 82期望'===',而是看到'=='。
line 590 col 102期望'===',而是看到'=='。
line 590 col 122期望'===',而是看到'=='。
line 590 col 142预期'===',而是看到'=='。
line 590 col 163预期'===',而是看到'=='。
第805行第54列意外使用'>>>'。
第814行col 38缺少调用构造函数的'()'。
line 995 col 33缺少调用构造函数的'()'。
line 995 col 13 for的主体应该包装在if语句中,以过滤来自原型的不需要的属性。
line 1037 col 42预计'!==',而是看到'!='。
line 1063 col 66预期'!==',而是看到'!='。
line 1208 col 72预期'===',而是看到'=='。
line 1208 col 95期望'===',而是看到'=='。
第1226行col 36期望'===',而是看到'=='。
第1229行col 40预期'===',而是看到'=='。
line 1229 col 59块嵌套太深。 (4)
line 1231 col 36块嵌套太深。 (4)
line 1278 col 26预期'===',而是看到'=='。
第1291行col 26预期'!==',而是看到'!='。
line 1305 col 23预期'!==',而是看到'!='。
第1323行col 66缺少调用构造函数的'()'。
第1340行col 42预期'===',而是看到'=='。
第1355行col 32预期'===',而是看到'=='。
line 1400 col 44期望一个赋值或函数调用,而是看到一个表达式。
第1416行col 27'arrayEach'在它被定义之前被使用。
line 1678 col 17在'?'之前出现坏行。
line 1721 col 29预期'===',而是看到'=='。
line 1722 col 17在'?'之前破坏线。
line 1737 col 38预期'===',而是看到'=='。
line 1764 col 35期望赋值或函数调用,而是看到一个表达式。
第1788行col 24预期'===',而是看到'=='。
line 1790 col 21在'?'之前破坏线。
第1793行col 24预期'===',而是看到'=='。
第1793行col 24错误太多。 (14%扫描)。

✖2错误
⚠49警告


assets / js / dev / lib / modernizr.js
line 2 col 12449角色可能会被一个或多个浏览器无声地删除。
第2行col 3272缺少使用严格语句。
第2行col 3308缺少分号。
第2行col 3368预期的'{',而是看到'如果'。
第2行col 3509预期'{',而是看到'for'。
line 2 col 3548块嵌套太深。 (4)
第2行col 3548预期的'{',而是看到'A'。
第2行col 3615字符串必须使用单引号。
第2行col 3648预期的'{',而是看到'o'。
第2行col 3668字符串必须使用单引号。
第2行col 3772不要使用布尔作为构造函数。
line 2 col 3845字符串必须使用单引号。
第2行col 3851字符串必须使用单引号。
第2行col 3863字符串必须使用单引号。
line 2 col 3864期望一个赋值或函数调用,而是看到一个表达式。
第2行col 3865缺少分号。
第2行col 3952字符串必须使用单引号。
第2行col 4036字符串必须使用单引号。
第2行col 4053字符串必须使用单引号。
第2行col 4073字符串必须使用单引号。
第2行col 4082字符串必须使用单引号。
第2行col 4083缺少分号。
第2行col 4124字符串必须使用单引号。
第2行col 4137字符串必须使用单引号。
第2行col 4200预期一个赋值或函数调用,而是看到一个表达式。
第2行col 4201缺少分号。
第2行col 4235字符串必须使用单引号。
第2行col 4237预期'===',而是看到'=='。
第2行col 4246预期的'{',而是看到'for'。
第2行col 4261预期的'{',而是看到'hasOwnProp'。
第2行col 4292期望赋值或函数调用,而是看到一个表达式。
第2行col 4246 for的主体应该包装在if语句中以从原型中过滤不需要的属性。
第2行col 4334字符串必须使用单引号。
第2行col 4360预计'===',而是看到'=='。
第2行col 4393字符串必须使用单引号。
第2行col 4395预期'!==',而是看到'!='。
第2行col 4404预期'{',而是看到'返回'。
第2行col 4433字符串必须使用单引号。
第2行col 4435预期'===',而是看到'=='。
第2行col 4453预期'===',而是看到'=='。
第2行col 4551不要使用布尔值作为构造函数。
第2行col 4625预期'!==',而是看到'!='。
第2行col 4629字符串必须使用单引号。
第2行col 4635字符串必须使用单引号。
第2行col 4647字符串必须使用单引号。
第2行col 4673期望赋值或函数调用,而是看到一个表达式。
第2行col 4674缺少分号。
第2行col 4691缺少分号。
第2行col 4733字符串必须使用单引号。
第2行col 4735预期'!==',而是看到'!='。
第2行col 4735错误太多。 (40%扫描)。

✖2错误
⚠49警告

[15:13:42]水管工发现未处理的错误:
错误:EACCES:权限被拒绝,打开'/Users/user/Documents/Projects/project-x/public/assets/js/app-load.js'
events.js:141
throw er; //未处理'error'事件
^

错误:EACCES:权限被拒绝,打开'/ Users / user / Documents / Projects / project-x / public / assets / font / text /错误(原生)
c12320:project-x用户$

错误(



如果我输入gulp build,输出结果为

终端在同一端口上运行其他应用程序。发生这种情况时,多个应用程序试图访问相同的端口,它总是先进先出。



祝你好运!!!


I'm trying to run node 4.2.2 on a Mac OS and i'm not understanding why every time i get this error message:

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: spawn /Users/user/Documents/Projects/project-x/node_modules/gifsicle/vendor/gifsicle ENOENT
    at exports._errnoException (util.js:874:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:441:9)
    at process._tickCallback (node.js:355:17)
c12320:project-x user$ 

What's going wrong? If i run "gulp build" there is this output:

c12320:project-x user$ gulp build
[15:13:41] Using gulpfile ~/Documents/Projects/project-x/gulpfile.js
    [15:13:41] Starting 'clean'...
    [15:13:41] Finished 'clean' after 160 μs
    [15:13:41] Starting 'build'...
    [15:13:41] Starting 'copy-assets'...
    [15:13:41] Finished 'copy-assets' after 13 ms
    [15:13:41] Starting 'minify-img'...
    [15:13:41] Starting 'compile-css'...
    [15:13:41] Starting 'compile-js'...
    [15:13:41] Finished 'build' after 52 ms
    [15:13:41] 'minify-img' errored after 468 ms
    [15:13:41] Error: EACCES: permission denied, mkdir '/Users/user/Documents/Projects/project-x/public/assets/img/dummy'
        at Error (native)

    assets/js/00-bootstrap.js
      line 3  col 5  Missing "use strict" statement.

      ✖  1 error  ⚠  0 warning

    [15:13:41] Plumber found unhandled error:
     Error: EACCES: permission denied, open '/Users/user/Documents/Projects/project-x/public/assets/css/develop.css'

    assets/js/dev/lib/lodash.js
      line 13    col 5    Missing "use strict" statement.
      line 13    col 9    Expected an identifier and instead saw 'undefined' (a reserved word).
      line 217   col 12   Strings must use singlequote.
      line 227   col 21   Strings must use singlequote.
      line 249   col 12   Strings must use singlequote.
      line 249   col 17   Strings must use singlequote.
      line 263   col 67   Expected '===' and instead saw '=='.
      line 374   col 31   Expected '===' and instead saw '=='.
      line 386   col 24   Expected '===' and instead saw '=='.
      line 565   col 44   Expected '!==' and instead saw '!='.
      line 565   col 81   Expected '===' and instead saw '=='.
      line 577   col 42   Expected '===' and instead saw '=='.
      line 589   col 85   Expected '===' and instead saw '=='.
      line 589   col 103  Expected '===' and instead saw '=='.
      line 589   col 123  Expected '===' and instead saw '=='.
      line 589   col 143  Expected '===' and instead saw '=='.
      line 590   col 62   Expected '===' and instead saw '=='.
      line 590   col 82   Expected '===' and instead saw '=='.
      line 590   col 102  Expected '===' and instead saw '=='.
      line 590   col 122  Expected '===' and instead saw '=='.
      line 590   col 142  Expected '===' and instead saw '=='.
      line 590   col 163  Expected '===' and instead saw '=='.
      line 805   col 54   Unexpected use of '>>>'.
      line 814   col 38   Missing '()' invoking a constructor.
      line 995   col 33   Missing '()' invoking a constructor.
      line 995   col 13   The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
      line 1037  col 42   Expected '!==' and instead saw '!='.
      line 1063  col 66   Expected '!==' and instead saw '!='.
      line 1208  col 72   Expected '===' and instead saw '=='.
      line 1208  col 95   Expected '===' and instead saw '=='.
      line 1226  col 36   Expected '===' and instead saw '=='.
      line 1229  col 40   Expected '===' and instead saw '=='.
      line 1229  col 59   Blocks are nested too deeply. (4)
      line 1231  col 36   Blocks are nested too deeply. (4)
      line 1278  col 26   Expected '===' and instead saw '=='.
      line 1291  col 26   Expected '!==' and instead saw '!='.
      line 1305  col 23   Expected '!==' and instead saw '!='.
      line 1323  col 66   Missing '()' invoking a constructor.
      line 1340  col 42   Expected '===' and instead saw '=='.
      line 1355  col 32   Expected '===' and instead saw '=='.
      line 1400  col 44   Expected an assignment or function call and instead saw an expression.
      line 1416  col 27   'arrayEach' was used before it was defined.
      line 1678  col 17   Bad line breaking before '?'.
      line 1721  col 29   Expected '===' and instead saw '=='.
      line 1722  col 17   Bad line breaking before '?'.
      line 1737  col 38   Expected '===' and instead saw '=='.
      line 1764  col 35   Expected an assignment or function call and instead saw an expression.
      line 1788  col 24   Expected '===' and instead saw '=='.
      line 1790  col 21   Bad line breaking before '?'.
      line 1793  col 24   Expected '===' and instead saw '=='.
      line 1793  col 24   Too many errors. (14% scanned).

      ✖  2 errors
      ⚠  49 warnings


    assets/js/dev/lib/modernizr.js
      line 2  col 12449  This character may get silently deleted by one or more browsers.
      line 2  col 3272   Missing "use strict" statement.
      line 2  col 3308   Missing semicolon.
      line 2  col 3368   Expected '{' and instead saw 'if'.
      line 2  col 3509   Expected '{' and instead saw 'for'.
      line 2  col 3548   Blocks are nested too deeply. (4)
      line 2  col 3548   Expected '{' and instead saw 'A'.
      line 2  col 3615   Strings must use singlequote.
      line 2  col 3648   Expected '{' and instead saw 'o'.
      line 2  col 3668   Strings must use singlequote.
      line 2  col 3772   Do not use Boolean as a constructor.
      line 2  col 3845   Strings must use singlequote.
      line 2  col 3851   Strings must use singlequote.
      line 2  col 3863   Strings must use singlequote.
      line 2  col 3864   Expected an assignment or function call and instead saw an expression.
      line 2  col 3865   Missing semicolon.
      line 2  col 3952   Strings must use singlequote.
      line 2  col 4036   Strings must use singlequote.
      line 2  col 4053   Strings must use singlequote.
      line 2  col 4073   Strings must use singlequote.
      line 2  col 4082   Strings must use singlequote.
      line 2  col 4083   Missing semicolon.
      line 2  col 4124   Strings must use singlequote.
      line 2  col 4137   Strings must use singlequote.
      line 2  col 4200   Expected an assignment or function call and instead saw an expression.
      line 2  col 4201   Missing semicolon.
      line 2  col 4235   Strings must use singlequote.
      line 2  col 4237   Expected '===' and instead saw '=='.
      line 2  col 4246   Expected '{' and instead saw 'for'.
      line 2  col 4261   Expected '{' and instead saw 'hasOwnProp'.
      line 2  col 4292   Expected an assignment or function call and instead saw an expression.
      line 2  col 4246   The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
      line 2  col 4334   Strings must use singlequote.
      line 2  col 4360   Expected '===' and instead saw '=='.
      line 2  col 4393   Strings must use singlequote.
      line 2  col 4395   Expected '!==' and instead saw '!='.
      line 2  col 4404   Expected '{' and instead saw 'return'.
      line 2  col 4433   Strings must use singlequote.
      line 2  col 4435   Expected '===' and instead saw '=='.
      line 2  col 4453   Expected '===' and instead saw '=='.
      line 2  col 4551   Do not use Boolean as a constructor.
      line 2  col 4625   Expected '!==' and instead saw '!='.
      line 2  col 4629   Strings must use singlequote.
      line 2  col 4635   Strings must use singlequote.
      line 2  col 4647   Strings must use singlequote.
      line 2  col 4673   Expected an assignment or function call and instead saw an expression.
      line 2  col 4674   Missing semicolon.
      line 2  col 4691   Missing semicolon.
      line 2  col 4733   Strings must use singlequote.
      line 2  col 4735   Expected '!==' and instead saw '!='.
      line 2  col 4735   Too many errors. (40% scanned).

      ✖  2 errors
      ⚠  49 warnings

    [15:13:42] Plumber found unhandled error:
     Error: EACCES: permission denied, open '/Users/user/Documents/Projects/project-x/public/assets/js/app-load.js'
    events.js:141
          throw er; // Unhandled 'error' event
          ^

    Error: EACCES: permission denied, open '/Users/user/Documents/Projects/project-x/public/assets/font/text/125eafff-7b5a-4c56-8a3a-d3fe11d8c3cc.svg'
        at Error (native)
    c12320:project-x user$ 

That's the output if i enter "gulp build"

解决方案

Check whether any other Terminal is running other Applications on the same port. This happens when multiple applications trying to access the same port, Its always FIFO.

Good Luck!!!

这篇关于events.js:141扔呃; //未处理“错误”事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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