Npm 比特桶速率限制幻影

Npm 比特桶速率限制幻影,npm,continuous-integration,phantomjs,bitbucket,rate-limiting,Npm,Continuous Integration,Phantomjs,Bitbucket,Rate Limiting,我的CI构建不断失败,原因是: > phantomjs@1.9.7-15 install /home/travis/build/redgeoff/paste-image/node_modules/mocha-phantomjs/node_modules/phantomjs > node install.js PhantomJS detected, but wrong version 1.9.8 @ /usr/local/phantomjs/bin/phantomjs. Downloa

我的CI构建不断失败,原因是:

> phantomjs@1.9.7-15 install /home/travis/build/redgeoff/paste-image/node_modules/mocha-phantomjs/node_modules/phantomjs
> node install.js
PhantomJS detected, but wrong version 1.9.8 @ /usr/local/phantomjs/bin/phantomjs.
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2
Receiving...

Error requesting archive.
Status: 403
Request options: {
  "uri": "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2",
  "encoding": null,
  "followRedirect": true,
  "headers": {},
  "strictSSL": true
}
Response headers: {
  "x-amz-request-id": "31FE6AEAF3807721",
  "x-amz-id-2": "ePama6pBgS1VdgDLGaFpUxLSmqkm0KJ/mflR8jUU28aPteacBzcKHeoQf18F+Sz7KKrn5UzGMVE=",
  "content-type": "application/xml",
  "transfer-encoding": "chunked",
  "date": "Fri, 16 Sep 2016 06:56:57 GMT",
  "server": "AmazonS3"
}
Make sure your network and proxy settings are correct.

这似乎是由于bitbucket.org上的速率限制。如何防止这些错误?

只需将链接导出到不同的二进制位置,例如导出PHANTOMJS_CDNURL=http://cnpmjs.org/downloads

例如,如果您正在使用TravisCI,您可以使用:

  global:
    - PHANTOMJS_CDNURL=http://cnpmjs.org/downloads
在CircleCI中,您可以使用以下各项:

machine:

  environment:
    # Use a CDN to prevent bitbucket rate limits when downloading phantomjs
    PHANTOMJS_CDNURL: http://cnpmjs.org/downloads

只需将链接导出到不同的二进制位置,例如导出PHANTOMJS_CDNURL=http://cnpmjs.org/downloads

例如,如果您正在使用TravisCI,您可以使用:

  global:
    - PHANTOMJS_CDNURL=http://cnpmjs.org/downloads
在CircleCI中,您可以使用以下各项:

machine:

  environment:
    # Use a CDN to prevent bitbucket rate limits when downloading phantomjs
    PHANTOMJS_CDNURL: http://cnpmjs.org/downloads