安装hexo时提示错误,使用npm安装速度慢

错误描述

英文:

1
npm WARN deprecated swig@1.4.2:This package is no longer maintained

翻译:npm WARN弃用swig@1.4.2:这个包不再维护

解决方案

使用国内安装源,这里使用淘宝的,命令如下:

1
npm install -g cnpm --registry=https://registry.npm.taobao.org

使用国内的安装源后命令变为cnpm,如下:

原来

1
2
3
4
5
6
$ npm install hexo-cli -g
$ npm install hexo-deployer-git
$ hexo init
$ npm install
$ hexo g
$ hexo s

现在

1
2
3
4
5
6
$ cnpm install hexo-cli -g 
$ cnpm install hexo-deployer-git
$ hexo init
$ cnpm install
$ hexo g
$ hexo s

问题描述

如果我不想使用国内的镜像怎么办呢,那也很简单,命令如下

1
$ cnpm onfig edit

找到bash registry=https://registry.npm.taobao.org将其注释即可

你是本站第位访客 本站访客数人次
Fork me on GitHub