npm install 报错 https://segmentfault.com/q/1010000006712506

  1. run npm config get proxy看看拿到什么

  2. 如果上面的返回不为空,npm config set proxy null或者npm config delete proxy ,顺便把https的代理也关掉npm config set https-proxy null, 证书问题,把证书的校验关掉npm config set strict-ssl false, 当然上面的命令你不用全敲一遍,根据报错信息提示,选择对应的解决方式, 然后再试试

  3. 如果1的命令为空,检查你的环境变量里面是不是有HTTP_PROXY

  4. 是不是开了全局的代理

 

# Clone project
git clone https://github.com/PanJiaChen/vueAdmin-template.git

# Install dependencies
npm install

# 建议不要用cnpm  安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题
npm install --registry=https://registry.npm.taobao.org

# serve with hot reload at localhost:9528
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

https://github.com/PanJiaChen/vueAdmin-template/blob/master/README-zh.md

posted @ 2018-01-18 19:49  he0xff  阅读(249)  评论(0编辑  收藏  举报