If you get this kind of error after installed nodejs in window 10, it means that your ssl is not pointed correctly.
So you have to point to the correct path.
echo %OPENSSL_CONF% (See your openssl path)
set OPENSSL_CONF=C:\OpenSSL\bin\openssl.cnf (Set your openssl path)
After that try and type
npm -v
again in cmd. You should be able to proceed without error.