我想执行这个简单的例子量角器https://coryrylan.com/blog/introduction-to-e2e-testing-with-the-angular-cli-and-protractor和我得到
webpack: Compiled successfully.
events.js:182
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 123.123.123.123:443
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1185:14)
至于我能理解,这是造成失败而更新webdrive经理的错误。 我试图手动更新由自己,但我仍然得到同样的错误。
PS C:\_pocs\ws_vsc\ng-pokedex-master> npm install -g webdriver-manager
C:\Users\dca\AppData\Roaming\npm\webdriver-manager -> C:\Users\dca\AppData\Roaming\npm\node_modules\webdriver-manager\bin\webdriver-manager
+ webdriver-manager@12.0.6
added 93 packages in 7.637s
PS C:\_pocs\ws_vsc\ng-pokedex-master> ng e2e
** NG Live Development Server is listening on localhost:49152, open your browser on http://localhost:49152/ **
Date: 2017-12-27T15:18:27.307Z
Hash: 7b44c1a34c892e7982d9
Time: 11649ms
chunk {about.module} about.module.chunk.js, about.module.chunk.js.map () 5.36 kB [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 41.1 kB [initial] [rendered]
chunk {pokemon.module} pokemon.module.chunk.js, pokemon.module.chunk.js.map () 19.3 kB [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 199 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 66.4 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.33 MB [initial] [rendered]
(node:14144) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
webpack: Compiled successfully.
events.js:182
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 123.123.123.123:443
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1185:14)
并且,其他的暂时
PS C:\_pocs\ws_vsc\ng-pokedex-master> webdriver-manager start
webdriver-manager: using global installed version 12.0.6
[16:20:31] W/start - the out_dir path C:\Users\dca\AppData\Roaming\npm\node_modules\webdriver-manager\selenium does not exist, run webdriver-manager update
PS C:\_pocs\ws_vsc\ng-pokedex-master> webdriver-manager update
webdriver-manager: using global installed version 12.0.6
[16:20:52] I/file_manager - creating folder C:\Users\dca\AppData\Roaming\npm\node_modules\webdriver-manager\selenium
events.js:182
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT 123.123.123.123:443
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1185:14)
我不认为这将是相关的,但万一这里是从上述项目的package.json。 我想这两个“量角器”:“〜5.1.1”和5.1.2
{
"name": "ng-pokedex",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"lint": "sass-lint && ng lint",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"build": "ng build",
"build:prod": "npm run lint && ng build --prod --stats-json",
"deploy": "npm run build:prod && firebase deploy",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.1.2",
"@angular/common": "^5.1.2",
"@angular/compiler": "^5.1.2",
"@angular/core": "^5.1.2",
"@angular/forms": "^5.1.2",
"@angular/http": "^5.1.2",
"@angular/platform-browser": "^5.1.2",
"@angular/platform-browser-dynamic": "^5.1.2",
"@angular/router": "^5.1.2",
"@angular/service-worker": "^5.1.2",
"blueprint-css": "2.4.2",
"core-js": "^2.5.3",
"rxjs": "^5.5.6",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.6.1",
"@angular/compiler-cli": "^5.1.2",
"@angular/language-service": "^5.1.2",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^6.0.95",
"codelyzer": "^4.0.2",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.3",
"karma-jasmine": "^1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.1",
"sass-lint": "1.12.1",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2",
"webpack-bundle-analyzer": "2.9.0"
}
}
其他的事情只是来到我的脑海里,我有错误的代理配置,但我可以成功运行NPM安装,所以我不认为这会解释我的问题。 顺便说一句,这里是
H:\>npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/5.5.1 node/v8.8.1 win32 x64"
; userconfig C:\Users\dca\.npmrc
http-proxy = "http://XXX.vm.mycompany.net:3128/"
https-proxy = "http://XXX.vm.mycompany.net:3128/"
proxy = "http://XXX.vm.mycompany.net:3128/"
; builtin config undefined
prefix = "C:\\Users\\dca\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = H:\
; HOME = C:\Users\dca
; "npm config ls -l" to show all defaults.