npm编译vue出错:Error code CERT_HAS_EXPIRED

[Error]The error message is about the registry https://npm.sap.com/ you used.

npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://npm.sap.com/@sap%2fcds failed, reason: certificate has expired

[Solution]
run command npm config delete "@sap:registry"

You can run the command to switch to public npm registry:
npm config set registry http://registry.npmjs.org/     【使用这个语句搞定】

Maybe you can also check your .npmrc file and remove all registry configuration related to the https://npm.sap.com/. By default, you should then use the public registry http://registry.npmjs.org/.

posted @ 2024-01-30 18:23  酒哥-颢远  阅读(810)  评论(0编辑  收藏  举报