【问题标题】:ng serve throws unhandled error eventng serve 抛出未处理的错误事件
【发布时间】:2017-01-10 09:06:47
【问题描述】:

所以我刚刚开始了一个新的 angular-cli 项目,当我尝试运行 ng serve 时,我得到了 Unhandeled Error 事件。我目前正在运行节点 v7.1.0。 我正在关注hackernews的教程。 https://houssein.me/angular2-hacker-news 我安装了 angular-cli global。所以一切都很顺利,只是 ng serve 命令没有

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

Error: write EINVAL
at exports._errnoException (util.js:1022:11)
at WriteStream.Socket._writeGeneric (net.js:715:26)
at WriteStream.Socket._write (net.js:734:8)
at doWrite (_stream_writable.js:334:12)
at writeOrBuffer (_stream_writable.js:320:5)
at WriteStream.Writable.write (_stream_writable.js:247:11)
at WriteStream.Socket.write (net.js:661:40)
at defaultHandler (D:\2MCT-Web-UX\Web-Front-End\P2\Angular     
basics\Hackernews\angular2-           hn\node_modules\webpack\lib\ProgressPlugin.js:175:18)

at Compiler.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular   basics\Hackernews\angular2-hn\node_modules\webpack\lib\ProgressPlugin.js:130:4)
at Compiler.applyPlugins (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\tapable\lib\Tapable.js:25:14)
at Watching._done (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:92:17)
at Watching.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:75:18)
at Compiler.emitRecords (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:347:37)
at Watching.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:58:19)
at D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:340:11
at next (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\tapable\lib\Tapable.js:102:11)
at Compiler.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\@ngtools\webpack\src\plugin.js:207:13)
at Compiler.applyPluginsAsyncSeries (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\tapable\lib\Tapable.js:106:13)
at Compiler.afterEmit (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:337:8)
at Compiler.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:332:14)
at D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\node_modules\async\lib\async.js:52:16
at Object.async.forEachOf.async.eachOf (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\node_modules\async\lib\async.js:236:30)
at Object.async.forEach.async.each (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\node_modules\async\lib\async.js:209:22)
at Compiler.emitFiles (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack\lib\Compiler.js:300:20)
at Immediate.<anonymous> (D:\2MCT-Web-UX\Web-Front-End\P2\Angular basics\Hackernews\angular2-hn\node_modules\webpack-dev-middleware\node_modules\memory-fs\lib\MemoryFileSystem.js:288:4)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)

【问题讨论】:

    标签: angularjs node.js angular-cli


    【解决方案1】:

    修好了!只需将 Node.js 更新到最新版本 https://nodejs.org/en/

    【讨论】:

      猜你喜欢
      • 2013-05-25
      • 1970-01-01
      • 2019-10-20
      • 2019-01-08
      • 2019-05-04
      • 2018-10-03
      • 1970-01-01
      • 1970-01-01
      • 2020-01-16
      相关资源
      最近更新 更多