You can try one of the following methods:
1. Downgrade to Node.js v16.
You can reinstall the current LTS version from the Node.js official website.
You can also use nvm
. For Windows systems, use nvm-windows
.
2. Enable legacy OpenSSL provider.
On Unix-like systems (Linux, macOS, Git bash, etc.):
export NODE_OPTIONS=--openssl-legacy-provider
On a Windows command prompt:
set NODE_OPTIONS=--openssl-legacy-provider
On PowerShell:
$env:NODE_OPTIONS = "--openssl-legacy-provider"
In your package.json file: modify this line of code
"start": "react-scripts start"
changed to
"start": "react-scripts --openssl-legacy-provider start"