JSS, Sitecore

Quick fix: unable to verify the first certificate – JSS setup error

For the very first time when I started setting up the JSS application on my local system, most of the steps went well. However, when I executed the .\up.ps1 command, after downloading all the images and setting up the containers, I got the following error for the certificate.

After putting some thoughts, I was reminded of the following message when I expected the .\init.ps1 script.

As mentioned in the above image, to avoid any HTTPS errors, we have to execute the following command.

setx NODE_EXTRA_CA_CERTS C:\Users\developer\AppData\Local\mkcert\rootCA.pem

HOWEVER, make sure you exit the command prompt and start it again to take the above command changes in effect. Otherwise, you will get the above-mentioned error without any notifications.

Thanks for reading!!!