1

当我运行时:

ng new ng-demo
cd ng-demo
ng e2e

然后终端输出:

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2018-12-24T09:11:46.656Z
Hash: c327cfcccf9319a7f705
Time: 8735ms
chunk {main} main.js, main.js.map (main) 9.76 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 16.3 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 3.43 MB [initial] [rendered]
[17:11:46] I/file_manager - creating folder /Users/xxx/git/ng-demo/node_modules/protractor/node_modules/webdriver-manager/selenium
[17:11:46] I/config_source - curl -o/Users/xxx/git/ng-demo/node_modules/protractor/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
ℹ 「wdm」: Compiled successfully.

我在浏览器中打开http://localhost:4200/,网页是正确的,但没有任何输出如:should display welcome message ...。过了一会儿,终端抛出一个错误:

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

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
    at Request.onRequestError (/Users/xxx/git/ng-demo/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:187:15)
    at TLSSocket.socketErrorListener (_http_client.js:391:9)
    at TLSSocket.emit (events.js:182:13)
    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)

我的环境在这里:

Angular CLI: 7.1.4
Node: 10.13.0
OS: darwin x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.11.4
@angular-devkit/build-angular     0.11.4
@angular-devkit/build-optimizer   0.11.4
@angular-devkit/build-webpack     0.11.4
@angular-devkit/core              7.1.4
@angular-devkit/schematics        7.1.4
@ngtools/webpack                  7.1.4
@schematics/angular               7.1.4
@schematics/update                0.11.4
rxjs                              6.3.3
typescript                        3.1.6
webpack                           4.23.1

我错过了什么吗?

4

0 回答 0