While it is possible to solve this problem by downgrading to Node 16 (either by replacing the installed version of node or using the node version manager nvm), an alternative is to Enable the legacy OpenSSL provider.
The way to do this differs between platforms Unix-like (Linux, macOS, Git bash, etc.):
export NODE_OPTIONS=āopenssl-legacy-provider
On Windows the way to do this differs between Windows Command Prompt and PowerShell.
Windows Command Prompt:
set NODE_OPTIONS=āopenssl-legacy-provider
On Windows you can also update the script within package.json to be
āstartā: āSET NODE_OPTIONS=āopenssl-legacy-provider && react-scripts startā,
Will the webviewer be available out of the box for Node 18 (without having to change NODE_OPTIONS)? The documentation states that it can support Node.js versions 8 - 18.
WebViewer isnāt tied to a specific version of Node, but this specific issue (which I believe is to do with WebPack which is used for apps created with ācreate-react-appā) is not a WebViewer problem as such.
I found that creating a new app using Vite solved this issue see https://www.youtube.com/watch?v=i-1rhs6oPgs
I encountered the same error ādigital-envelope-routines:: unsupportedā when using Node.js 18. The environment variable NODE_OPTIONS=--openssl-legacy-provider (set via PowerShell, as advised) did not help.
I solved the problem as follows: I completely uninstalled the current version of Node.js (including all global packages and npm cache), and then installed Node.js v16 (LTS) through the official installer from https://nodejs.org/. After that I reinstalled all project dependencies (npm install) and the error disappeared.
Maybe it will help someone if the NODE_OPTIONS option doesnāt work. It seems that in my case, the problem was in the Node.js 18 version and not in OpenSSL settings.
By the way, since weāre talking about OpenSSL and security, I recently read an interesting article about how important it is to keep track of security updates and install them in time. Hereās the link if youāre interested https://andersenlab.com/services/managed-soc-as-a-service It also seems you can read about security audits there.