{"id":135366,"date":"2020-07-12T14:59:34","date_gmt":"2020-07-12T06:59:34","guid":{"rendered":"http:\/\/4563.org\/?p=135366"},"modified":"2020-07-12T14:59:34","modified_gmt":"2020-07-12T06:59:34","slug":"%e8%af%b7%e6%95%99%e4%b8%80%e4%b8%8b%ef%bc%8c%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e7%9a%84-yarn-%e8%bf%9e%e6%8e%a5%e4%b8%8d%e4%b8%8a-https-registry-yarnpkg-com%ef%bc%8c-timeout-error","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=135366","title":{"rendered":"\u8bf7\u6559\u4e00\u4e0b\uff0c\u4e3a\u4ec0\u4e48\u6211\u7684 yarn \u8fde\u63a5\u4e0d\u4e0a https:\/\/registry.yarnpkg.com\uff0c timeout error"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\u4e00\u4e0b\uff0c\u4e3a\u4ec0\u4e48\u6211\u7684 yarn \u8fde\u63a5\u4e0d\u4e0a https:\/\/registry.yarnpkg.com\uff0c timeout error               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yazoox <\/span>  <span><i><\/i> 123<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u8f93\u5165 <code>create-react-app myapp --typescript<\/code><\/p>\n<p>\u7136\u540e\u5f97\u5230\u4e0b\u9762\u7684\u9519\u8bef\u63d0\u793a<\/p>\n<p>google \u4e86\u4e00\u4e0b\uff0c\u4ec0\u4e48&#8211;timeout=999999\uff0c\u91cd\u542f\u673a\u5668\uff0c\u8bbe\u7f6e npm registry\uff0cnode \u6362\u6210 10.0+\uff0c\u68c0\u67e5 ie \u8bbe\u7f6e\uff0c\u4e5f\u6ca1\u6709\u8bbe\u7f6e proxy\uff0c\u597d\u50cf\u90fd\u6ca1\u6709\u7528\u3002\u8fd8\u662f\u62a5\u4e00\u6837\u7684\u9519\u8bef\u3002<\/p>\n<p>\u8bf7\u6709\u7ecf\u9a8c\u7684\u5927\u795e\u5e2e\u5fd9\u770b\u4e00\u773c\u3002<\/p>\n<p>\u7cfb\u7edf\u662f windows10<\/p>\n<p>c:users&lt;username&gt;.npmrc \u91cc\u9762\uff0c\u6307\u5411\u56fd\u5185\u7684\u5730\u5740\uff0c\u5e94\u8be5\u6ca1\u6709\u95ee\u9898\u5427\uff1f<\/p>\n<p>registry=https:\/\/registry.npm.taobao.org\/<\/p>\n<pre><code>yarn add v1.22.4 [1\/4] Resolving packages... [2\/4] Fetching packages... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... error An unexpected error occurred: \"https:\/\/registry.yarnpkg.com\/babel-jest\/-\/babel-jest-24.9.0.tgz: connect ETIMEDOUT 104.16.16.35:443\". info If you think this is a bug, please open a bug report with the information provided in \"C:\\src\\myapp\\yarn-error.log\". info Visit https:\/\/yarnpkg.com\/en\/docs\/cli\/add for documentation about this command.  Aborting installation.   yarnpkg add --exact react react-dom react-scripts cra-template-typescript --cwd C:srcmyapp has failed.  Deleting generated file... package.json Deleting generated file... yarn.lock Done. <\/code><\/pre>\n<p>\u627e\u5230\u4e00\u4e2a yarn-error.log \u6587\u4ef6\uff0c\u4e3b\u8981 \u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<pre><code> Yarn version:    1.22.4  Node version:    8.10.0  Platform:    win32 x64  Trace:    Error: connect ETIMEDOUT 104.16.16.35:443       at Object._errnoException (util.js:1022:11)       at _exceptionWithHostPort (util.js:1044:20)       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)  npm manifest:    {     \"name\": \"myapp\",     \"version\": \"0.1.0\",     \"private\": true   }  yarn manifest:    No manifest <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>2<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1254805\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Virace <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             yarn config set registry https:\/\/registry.npm.taobao.org\/                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1254806\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yazoox <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Virace \u8c22\u8c22\uff01 it works. \u8fd9\u4e48\u7b80\u5355\u5c31\u89e3\u51b3\u4e86&#8230;&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\u4e00\u4e0b\uff0c\u4e3a\u4ec0\u4e48\u6211\u7684 yarn \u8fde&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/135366"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=135366"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/135366\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=135366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=135366"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=135366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}