npm
npm报错:unable to verify the first certificate
1 | npm config set strict-ssl false |
npm download binary files from github will raise error since the download speed is low.
use cnpm
instead, since it will route all github binary requests to mirrored cnpm cdn.
1 | npm i -g cnpm |
set some binary distribution file mirror to https://registry.npmmirror.com
in ~/.npmrc
and ~/.yarnrc
:
1 | canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas/ |