Npm not working (openSSL configuration error windows10x64)

Viewed 5325

I was getting this error whenever I try the npm command in powershell:

**~ $ node -v
v17.1.0
~ $ npm -v
OpenSSL configuration error:
74240000:error:80000003:system library:BIO_new_file:No such process:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
74240000:error:10000080:BIO routines:BIO_new_file:no such file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
74240000:error:07000072:configuration file routines:def_load:no such file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:
OpenSSL configuration error:
A8250000:error:80000003:system library:BIO_new_file:No such process:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling fopen(C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
A8250000:error:10000080:BIO routines:BIO_new_file:no such file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
A8250000:error:07000072:configuration file routines:def_load:no such file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:**

Another thing I noticed is that the node must have updated incorrectly because even though it gives me a version, I cannot uninstall it and cannot find the install files in my program files. I am at a total loss and about to just reset my computer to default. I want to repair it but everything online tells me to use npm, which in itself is not possible.

I have tried using the "set OpenSSL" command to empty or to a dummy file but it does not seem to do anything.

6 Answers

Go to the Windows control panel and click on Uninstall a program, select Node.js and click on the uninstall tab to uninstall the node and npm successfully. Restart your system. Then go to https://nodejs.org/en/ to download 16.13.0 LTS version and install it

Please check environment path using PowerShell

check environment path:

cmd /c echo %PATH%' or 'cmd /c echo %OPENSSL_CONF%

You will get C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf path so reset the environment path for openssl using below comment on PowerShell

set OPENSSL_CONF=''

after that, the problem will be fixed.

this issue already issued on Nodejs GitHub. https://github.com/nodejs/node/issues/40547

the only thing that you're to do is to create a new archive called openssl.cnf in this route:

C:\Program Files\PostgreSQL\psqlODBC\etc\openssl.cnf

Save the work and run in cmd: npm --version

Had this issue in a conda environment. Fixed by installing node with next command: conda install -c conda-forge nodejs=16.3.2

Try to uninstall the node from your project directory.

npm uninstall node

Most probably you have 2 different versions of Node installed on your system.

If my solution does not work for you. Try the other suggestions with uninstalling Node from the system.

My solution was to use another node version in this case 15.8.0, you can try with others most recently versions. When I did this npm was installed correctly:

enter image description here

Related