创建脚手架报错;
C:\Users\admin>npm install -g vue-cli
npm error code CERT_HAS_EXPIRED
npm error errno CERT_HAS_EXPIRED
npm error request to https://registry.npm.taobao.org/vue-cli failed, reason: certificate has expired
npm error A complete log of this run can be found in: C:\Users\admin\AppData\Local\npm-cache\_logs\2025-01-05T11_28_16_628Z-debug-0.log
原因: 这个域名的证书过期了,可以直接使用 http 或 重新换个源;
npm config set registry http://registry.npm.taobao.org/
或者:
npm config set registry https://registry.npmjs.org/