npm.taobao.org 被强制跳转到阿里云了?

npm.taobao.org 被强制跳转到阿里云了? 在安装 cnpm install node-sass 的时候, 报了一堆错误, 后面发现首页已经被强制跳转到阿里云了.

https://www.aliyun.com/error/

UnzipError: invalid distance too far back, GET https://r.npm.taobao.org/is-typedarray 200 (connected: true, keepalive socket: true, agent status: {"createSocketCount":11,"createSocketErrorCount":0,"closeSocketCount":0,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":44,"freeSockets":{"r.npm.taobao.org:443::::::::::::::::::":1,"r.npm.taobao.org:443::::::::false::::::::::":10},"sockets":{},"requests":{}}, socketHandledRequests: 5, socketHandledResponses: 5)
headers: {"server":"Tengine","content-type":"application/json; charset=utf-8","content-length":"374","connection":"keep-alive","date":"Fri, 13 Nov 2020 15:36:37 GMT","x-current-requests":"1","vary":"accept, accept-encoding","etag":"W/\"2dd278432a90c4c144b2a2e90bffd52d\"","x-hit-cache":"list-is-typedarray-v1","cache-control":"max-age=0, s-maxage=120, must-revalidate","x-readtime":"1","via":"cn462.l1, kunlun10.cn462, l2cn2639.l2, cache66.l2cn2639, npmtaobao22, cache66.l2cn2639[37,304-0,M], cache12.l2cn2639[38,0], kunlun10.cn462[0,200-0,H], kunlun7.cn462[10,0]","x-swift-error":"forward peer connect close","content-encoding":"gzip","ali-swift-global-savetime":"1599054325","age":"109","x-cache":"HIT TCP_MEM_HIT dirn:10:51251358","x-swift-savetime":"Fri, 13 Nov 2020 15:36:38 GMT","x-swift-cachetime":"119","timing-allow-origin":"*","eagleid":"b739529b16052819066877428e"}
    at Zlib.zlibOnError [as onerror] (zlib.js:170:17)
阅读 1.3k
评论
    3 个回答

    改回默认的npm就可以了, 会比较慢, 但好过报错.

    npm config set registry https://registry.npmjs.org/ 

    一种使用yarn, 就能正确安装了.

    npm install yarn -g
    yarn install

      我这边也是跳转到阿里云500

        我这里也是……项目拉下来cnpm装不了,npm也装不了……

          撰写回答

          登录后参与交流、获取后续更新提醒

          相似问题
          推荐文章