Error starting nodejs: openssl config failed

The problem was that Express looks for the environment variable OPENSSL_CONF to lookup to SSL configuration file.

The variable OPENSSL_CONF was pointing to a non existence location on the drive. I removed from the system and the message disappear.

Note: must use a new console to launch the node so environment variable OPENSSL_CONF is not present. Or simple deleted on the current console.

Additional information at github


Please check the System Variables and confirm if the location of openssl.cnf file listed there is correct. Cross check it and update the location in System Variables. Sys variable image


Removing global environment variable OPENSSL_CONF (leftover from previous troubleshooting) solved my problem.

Running on Windows you might try:

Set environment in local command window and verify problem:

set OPENSSL_CONF=c:\dummy  
npm -v

=> you now probably see this ssl error message

Remove environment and verify problem is gone:

set OPENSSL_CONF=
npm -v

=> no ssl error message

Source: https://github.com/npm/npm/issues/17261