cancel
Showing results for 
Search instead for 
Did you mean: 

Getting npm ERR! code CERT_HAS_EXPIRED Error

hvzv
Discoverer

Hello Team,

I am facing issue in SAP Web ide , build is getting failed, it shows below error in console.

npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://npm.sap.com/@sap/di.code-validation.js/-/di.code-validation.js-1.1.6.tgz failed, reason: certificate has expired

npm ERR! A complete log of this run can be found in:
npm ERR! /mnt/npm_cache/_logs/2021-04-19T04_13_12_853Z-debug.log

9:43:15 AM (DIBuild)
UI5 Build failed.
.
[INFO] Build finished in 39 seconds Kindly provide your assistance.Best RegardsDeepa Kalyani

View Entire Topic
CSYew
Discoverer

This is because npm expired registry has expired/moved, and it's now replace it with NPM Registry.

  • You can go to your command-prompt enter this to change the registry path:npm config set @sap:registry=https://registry.npmjs.org/
  • Alternative way(manual change), you can locate the npm config file in your terminal using command:-

npm config list -> locate the .npmrc file -> open the file using notepad -> change the path

from @sap:registry = "https://npm.sap.com" to @sap:registry=https://registry.npmjs.org/


igor_muntoreanu
Explorer
0 Kudos

Thank you! It has solved my problem! 🙂