Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.43k stars 436 forks source link

Error: connect ETIMEDOUT 52.216.80.40:443 #774

Open flyq opened 6 years ago

flyq commented 6 years ago

PS C:\Users\xing9\Documents\workspace\solidity\ganache> npm install

sharp@0.18.4 install C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp node-gyp rebuild

C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 VError.cpp VInterpolate.cpp VImage.cpp win_delay_load_hook.cc Creating library C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\libvips-cpp. lib and object C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\libvips-cpp.exp Generating code Finished generating code libvips-cpp.vcxproj -> C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\libvips- cpp.dll libvips-cpp.vcxproj -> C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\libvips-c pp.pdb (Full PDB) common.cc metadata.cc operations.cc pipeline.cc sharp.cc utilities.cc win_delay_load_hook.cc Creating library C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\sharp.lib an d object C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\sharp.exp Generating code Finished generating code sharp.vcxproj -> C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\sharp.node sharp.vcxproj -> C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\sharp\build\Release\sharp.pdb (Full PDB) Copying vendor/lib/libcroco-0.6-3.dll to build/Release\libcroco-0.6-3.dll 已复制 1 个文件。 Copying vendor/lib/libfreetype-6.dll to build/Release\libfreetype-6.dll 已复制 1 个文件。 Copying vendor/lib/libcairo-2.dll to build/Release\libcairo-2.dll 已复制 1 个文件。 Copying vendor/lib/libexif-12.dll to build/Release\libexif-12.dll 已复制 1 个文件。 Copying vendor/lib/libgdk_pixbuf-2.0-0.dll to build/Release\libgdk_pixbuf-2.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libtiff-5.dll to build/Release\libtiff-5.dll 已复制 1 个文件。 Copying vendor/lib/liblcms2-2.dll to build/Release\liblcms2-2.dll 已复制 1 个文件。 Copying vendor/lib/libcairo-gobject-2.dll to build/Release\libcairo-gobject-2.dll 已复制 1 个文件。 Copying vendor/lib/libgif-7.dll to build/Release\libgif-7.dll 已复制 1 个文件。 Copying vendor/lib/libxml2-2.dll to build/Release\libxml2-2.dll 已复制 1 个文件。 Copying vendor/lib/libiconv-2.dll to build/Release\libiconv-2.dll 已复制 1 个文件。 Copying vendor/lib/libjpeg-62.dll to build/Release\libjpeg-62.dll 已复制 1 个文件。 Copying vendor/lib/libglib-2.0-0.dll to build/Release\libglib-2.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libfftw3-3.dll to build/Release\libfftw3-3.dll 已复制 1 个文件。 Copying vendor/lib/libcairo-script-interpreter-2.dll to build/Release\libcairo-script-interpreter-2.dll 已复制 1 个文件。 Copying vendor/lib/libgmodule-2.0-0.dll to build/Release\libgmodule-2.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libgthread-2.0-0.dll to build/Release\libgthread-2.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libfontconfig-1.dll to build/Release\libfontconfig-1.dll 已复制 1 个文件。 Copying vendor/lib/librsvg-2-2.dll to build/Release\librsvg-2-2.dll 已复制 1 个文件。 Copying vendor/lib/GNU.Gettext.dll to build/Release\GNU.Gettext.dll 已复制 1 个文件。 Copying vendor/lib/zlib1.dll to build/Release\zlib1.dll 已复制 1 个文件。 Copying vendor/lib/libstdc++-6.dll to build/Release\libstdc++-6.dll 已复制 1 个文件。 Copying vendor/lib/libasprintf-0.dll to build/Release\libasprintf-0.dll 已复制 1 个文件。 Copying vendor/lib/libgobject-2.0-0.dll to build/Release\libgobject-2.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libwebp-7.dll to build/Release\libwebp-7.dll 已复制 1 个文件。 Copying vendor/lib/libgio-2.0-0.dll to build/Release\libgio-2.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libgcc_s_seh-1.dll to build/Release\libgcc_s_seh-1.dll 已复制 1 个文件。 Copying vendor/lib/libquadmath-0.dll to build/Release\libquadmath-0.dll 已复制 1 个文件。 Copying vendor/lib/libintl-8.dll to build/Release\libintl-8.dll 已复制 1 个文件。 Copying vendor/lib/libpng16-16.dll to build/Release\libpng16-16.dll 已复制 1 个文件。 Copying vendor/lib/libpango-1.0-0.dll to build/Release\libpango-1.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libpixman-1-0.dll to build/Release\libpixman-1-0.dll 已复制 1 个文件。 Copying vendor/lib/libcharset-1.dll to build/Release\libcharset-1.dll 已复制 1 个文件。 Copying vendor/lib/libpangocairo-1.0-0.dll to build/Release\libpangocairo-1.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libvips-42.dll to build/Release\libvips-42.dll 已复制 1 个文件。 Copying vendor/lib/libgsf-1-114.dll to build/Release\libgsf-1-114.dll 已复制 1 个文件。 Copying vendor/lib/libpangowin32-1.0-0.dll to build/Release\libpangowin32-1.0-0.dll 已复制 1 个文件。 Copying vendor/lib/libffi-6.dll to build/Release\libffi-6.dll 已复制 1 个文件。 Copying vendor/lib/libexpat-1.dll to build/Release\libexpat-1.dll 已复制 1 个文件。 Copying vendor/lib/libssp-0.dll to build/Release\libssp-0.dll 已复制 1 个文件。

phantomjs-prebuilt@2.1.16 install C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\phantomjs-prebuilt node install.js

PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip Saving to C:\Users\xing9\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip Receiving...

Error making request. Error: connect ETIMEDOUT 52.216.80.40:443 at Object._errnoException (util.js:1024:11) at _exceptionWithHostPort (util.js:1046:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

Please report this full log at https://github.com/Medium/phantomjs npm WARN Error: EPERM: operation not permitted, scandir 'C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\get-folder-size\node_modules' npm WARN { Error: EPERM: operation not permitted, scandir 'C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\get-folder-size\node_modules' npm WARN stack: 'Error: EPERM: operation not permitted, scandir \'C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\get-folder-size\node_modules\'', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'scandir', npm WARN path: 'C:\Users\xing9\Documents\workspace\solidity\ganache\node_modules\get-folder-size\node_modules' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! phantomjs-prebuilt@2.1.16 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\xing9\AppData\Roaming\npm-cache_logs\2018-01-23T09_24_59_936Z-debug.log

ionian-wind commented 6 years ago

Same problem while trying install

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
--2018-01-25 13:37:49--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 104.192.143.2, 104.192.143.1, 104.192.143.3, ...
Connecting to bitbucket.org (bitbucket.org)|104.192.143.2|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=Cgx4BUmHOLQhNDEww1eSKbO1G18%3D&Expires=1516888464&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22 [following]
--2018-01-25 13:37:50--  https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=Cgx4BUmHOLQhNDEww1eSKbO1G18%3D&Expires=1516888464&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22
Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 54.231.72.107
Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|54.231.72.107|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23415665 (22M) [application/x-tar]
Saving to: ‘phantomjs-2.1.1-linux-x86_64.tar.bz2’

           phantomjs-2.1.   0%[                                    ]  16.54K   597 B/s    eta 10h 53m^C
ezze commented 6 years ago

I get the same error today installing my project's dependencies:

$ yarn
yarn install v1.6.0
info No lockfile found.
[1/4] Resolving packages...
warning markdown-toc > gray-matter > coffee-script@1.12.7: CoffeeScript on NPM has moved to     "coffeescript" (no hyphen)
warning webpack-cli > jscodeshift > babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
warning webpack-cli > webpack-addons > jscodeshift > babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! 
warning webpack-cli > jscodeshift > nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
warning webpack-cli > webpack-addons > jscodeshift > nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
[2/4] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/1] ⠐ phantomjs-prebuilt: Receiving...
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
[-/1] ⠐ waiting...
error /home/ezze/Development/geobase/node_modules/phantomjs-prebuilt: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /home/ezze/Development/geobase/node_modules/phantomjs-prebuilt
Output:
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...

Error making request.
Error: connect ETIMEDOUT 52.216.64.200:443
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
oodzchen commented 5 years ago

Looks like a network problem, I just solved it by using a network proxy on my system