安装canvas遇到解决node-pre-gyp WARN Using request for node-pre-gyp https download

安装canvas遇到解决node-pre-gyp WARN Using request for node-pre-gyp https download

安装node-canvas

[email protected] install /opt/program-node/node_modules/canvas
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download 

问题

node-pre-gyp WARN Using request for node-pre-gyp https download
从github下载c++的编译包太慢

解决方法

npm install canvas --canvas_binary_host_mirror=https://npm.taobao.org/mirrors/node-canvas-prebuilt/

多注意这个taobao源

https://npm.taobao.org/mirrors

你可能感兴趣的:(node)