I ran into this on macOS. From Terminal, I ran export to check my environment variables and saw that NODE_OPTIONS=--openssl-legacy-provider had been set. I then simply ran unset NODE_OPTIONS and then was able to use Node.js again.
I ran into this on macOS. From Terminal, I ran export to check my environment variables and saw that NODE_OPTIONS=--openssl-legacy-provider had been set. I then simply ran unset NODE_OPTIONS and then was able to use Node.js again.