简体   繁体   中英

Event.js:85 // Unhandled error event

I'm working on a project, and everything was working just fine this friday. I wanted to continue today, and tried to "Gulp watch" in the terminal.

I recieve this error:

  events.js:85
  throw er; // Unhandled 'error' event
        ^
   Error
   at Object.<anonymous> (c:\Users\Rasmus\desktop\sorthvid\fona\node_modules\gu
 lp-compile-handlebars\node_modules\handlebars\dist\cjs\handlebars\exception.js:2
6:23)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (c:\Users\Rasmus\desktop\sorthvid\fona\node_modules\gu
lp-compile-handlebars\node_modules\handlebars\dist\cjs\handlebars\base.js:3:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)

I can't figure out the problem. Does anyone know what might cause this?

Error
    at Object.<anonymous> (/Users/yuyulei/Projects/Node/meadowlark/site/node_modules/handlebars/dist/cjs/h    andlebars/exception.js:26:23)
        at Module._compile (module.js:425:26)
        at Object.Module._extensions..js (module.js:432:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:311:12)
        at Module.require (module.js:366:17)
        at require (module.js:385:17)
        at Object.<anonymous> (/Users/yuyulei/Projects/Node/meadowlark/site/node_modules/handlebars/dist/cjs/handlebars/base.js:3:17)
        at Module._compile (module.js:425:26)
        at Object.Module._extensions..js (module.js:432:10)

it's my error log. I think it's caused by Handlebars,like

{{#section 'jquery'}}
    <script>
    ......
    </script>
{{/section}}

then delete {{#section 'jquery'}} and {{/section}}, now it works.

You can try gulp-plumber It gives you readable error messages. May be it will indicate where is the error.

More likely the error into your template. I think handlebars-cmd can help you. Try to feed him your template. It must say you exactly, where's the error or at least hint about reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM