NPM常见错误

npm ERR! request to xxxx reason: unable to verify the first certificate

1
2
3
4
5
6
7
1. 关闭SSL验证:npm config set strict-ssl false
2. 关闭代理:npm config set proxy null
3. 清除缓存:npm cache clean --force
4. 设置国内镜像源:
1. npm config set registry https://registry.npm.taobao.org
2. npm set sentrycli_cdnurl=https://cdn.npm.taobao.org/dist/sentry-cli
5. 查看结果:npm config list