在中国大陆地区,可能会遇到访问国外npm仓库慢或不稳定的问题。可以尝试使用淘宝的npm镜像或其他国内的npm镜像来加速下载
修改镜像:
npm config set registry https://registry.npmjs.org/
npm install -g cnpm
重新安装canvas
cnpm install canvas
在中国大陆地区,可能会遇到访问国外npm仓库慢或不稳定的问题。可以尝试使用淘宝的npm镜像或其他国内的npm镜像来加速下载
修改镜像:
npm config set registry https://registry.npmjs.org/
npm install -g cnpm
重新安装canvas
cnpm install canvas