How to fix Node.js error: SSL Error: CERT_NOT_YET_VALID


How to fix Node.js error: SSL Error: CERT_NOT_YET_VALID:

npm ERR! Error: SSL Error: CERT_NOT_YET_VALID

Method 1:

npm config set registry http://registry.npmjs.org

Method 2: fix time

How to correct system clock

2.1 Sync the system clock to the current time:

ntpd -g -q

2.2 Check that the time appears correct:

date

2.3 Sync the server’s hardware clock to the system clock:

hwclock -wu

Leave a Reply