前提:npm下载安装好了
1. npm i –g windows-build-tools
2.npm i -g node-gyp
3.npm i nodejieba@2.5.2 (2.6.0版本会报404)
注:如果第三步下载超时, 即github无法访问,设置代理 ,如下
windows:c:\windows\system32\drivers\etc 下的hosts文件 用记事本打来
多个地点ping[github.com]服务器-网站测速-站长工具 打开这个网站,找一个延迟小的输入到hosts文件夹里
点击保存.如果遇到保存不了的情况,就把hosts文件复制一份到桌面,输入完代理后再拉到c:\windows\system32\drivers\etc 下进行覆盖.然后重复步骤3