npm install依赖时,常见错误

1、npm install依赖时,报错:npm ERR! Unexpected end of JSON input while parsing near '...gin":"^1.3.0","css-lo'

npm cache clean --force

再尝试

2、npm install依赖时,报错:npm ERR! Windows_NT 6.1.7601

npm config set proxy null(npm config delete proxy) --取消代理

npm config set https-proxy null

npm config set strict-ssl false    --关闭npm的https

然后再安装cnmp

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

posted @ 2018-04-12 10:35  纳豆  阅读(2587)  评论(0编辑  收藏  举报