ng new thrower; //未处理的“错误”事件

时间:2019-01-16 10:37:19

标签: node.js npm angular7

我正在为Angular应用程序使用Visual Studio代码,这是我第一次发现这种问题!

当我尝试创建一个新项目并点击ng new projects-name时,出现此错误:

? Would you like to add Angular routing? (y/N) events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: read EINVAL
    at TTY.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

我什至没有版本问题...好吧,我猜:X

Angular CLI: 7.1.2
Node: 10.13.0
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.11.2
@angular-devkit/core         7.1.2
@angular-devkit/schematics   7.1.2
@schematics/angular          7.1.2
@schematics/update           0.11.2
rxjs                         6.3.3
typescript                   3.1.6

和npm 6.5.0

有人可以帮我找出那里发生的事情吗? 我尝试卸载节点和npm,但仍然存在相同的问题

预先感谢,祝您愉快:)

1 个答案:

答案 0 :(得分:0)

此行命令解决的问题:

ng new foo-lib --routing --style=css